supervisor: Switch issue ownership logic from assignee email to assigned team#364
Conversation
…ned team Update Jira issue decoding and ownership checks to use the AssignedTeam custom field instead of assignee_email. Add JIRA_JOTNAR_TEAM constant and update related references across supervisor modules.
There was a problem hiding this comment.
Code Review
This pull request correctly switches the Jira issue ownership logic from using the assignee's email to using the 'AssignedTeam' custom field. This change is consistently applied across the data model, Jira utility functions, and the erratum handler. Additionally, several hardcoded strings have been beneficially replaced with constants from the JiraLabels enum. I've identified one potential issue in the erratum_handler.py file where a Jira component might be getting set to a label value, which could be a copy-paste error and lead to incorrect issue routing.
| reporter_email=JIRA_JOTNAR_BOT_EMAIL, | ||
| assignee_email=JIRA_JOTNAR_BOT_EMAIL, | ||
| labels=[JiraLabels.NEEDS_ATTENTION.value], | ||
| components=[JiraLabels.NEEDS_ATTENTION.value], |
There was a problem hiding this comment.
It appears there might be a copy-paste error here. The components argument is being set to JiraLabels.NEEDS_ATTENTION.value, which corresponds to the label "jotnar_needs_attention". The original value was "jotnar-package-automation", which is a more conventional name for a Jira component. Using a label value as a component could lead to issues being miscategorized. It would be better to use a dedicated component name, like the original one, or a specific constant if available.
| components=[JiraLabels.NEEDS_ATTENTION.value], | |
| components=["jotnar-package-automation"], |
0fd0412 to
26a1b0a
Compare
…onstants Replace string-literal Jira labels and bot emails with JiraLabels values and JIRA_JOTNAR_BOT_EMAIL. Update issue creation and attention-flagging logic to use centralized constants for improved consistency and maintainability.
d6d5083 to
d5a3bd1
Compare
for more information, see https://pre-commit.ci
owtaylor
left a comment
There was a problem hiding this comment.
This looks good to me.
The caveat here is that this will likely need changes for how package and QE ownership happen in the "Jotnar sequel" world, but this should be at least as good of a starting point.
Update Jira issue decoding and ownership checks to use the AssignedTeam custom field instead of assignee_email. Add JIRA_JOTNAR_TEAM constant and update related references across supervisor modules.
https://github.com/packit/jotnar/issues/275
Include some string replacement, see commit messages for details.