Skip to content

supervisor: Switch issue ownership logic from assignee email to assigned team#364

Merged
TomasTomecek merged 3 commits intopackit:mainfrom
Jazzcort:check-assigned-team-for-jira-issue-ownership
Feb 6, 2026
Merged

supervisor: Switch issue ownership logic from assignee email to assigned team#364
TomasTomecek merged 3 commits intopackit:mainfrom
Jazzcort:check-assigned-team-for-jira-issue-ownership

Conversation

@Jazzcort
Copy link
Copy Markdown
Collaborator

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.

…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.
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread supervisor/erratum_handler.py Outdated
reporter_email=JIRA_JOTNAR_BOT_EMAIL,
assignee_email=JIRA_JOTNAR_BOT_EMAIL,
labels=[JiraLabels.NEEDS_ATTENTION.value],
components=[JiraLabels.NEEDS_ATTENTION.value],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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.

Suggested change
components=[JiraLabels.NEEDS_ATTENTION.value],
components=["jotnar-package-automation"],

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

@Jazzcort Jazzcort force-pushed the check-assigned-team-for-jira-issue-ownership branch from 0fd0412 to 26a1b0a Compare November 18, 2025 19:24
…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.
@Jazzcort Jazzcort force-pushed the check-assigned-team-for-jira-issue-ownership branch from d6d5083 to d5a3bd1 Compare November 18, 2025 19:26
Copy link
Copy Markdown
Collaborator

@owtaylor owtaylor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@TomasTomecek TomasTomecek merged commit 3a7e4b8 into packit:main Feb 6, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants