Skip to content

Updates to handle changes after migrating to Atlasian cloud#174

Open
knobunc wants to merge 3 commits intomainfrom
jira-fix-px-score
Open

Updates to handle changes after migrating to Atlasian cloud#174
knobunc wants to merge 3 commits intomainfrom
jira-fix-px-score

Conversation

@knobunc
Copy link
Copy Markdown
Contributor

@knobunc knobunc commented Mar 24, 2026

The cloud migration renamed the px score custom field and it can now be empty since the bots are not populating it yet.

Cloud uses ids to identify users not email addresses. Changed the code to accommodate.

knobunc added 3 commits March 23, 2026 10:41
Updated the PX Score handling because the custom field changed when we
moved to cloud.  Also the tooling that populates it appears not to be
working, so I added handling for missing px scores.
Cloud uses account IDs not user IDs.  Updated to make it work.
Users are identified by ID not by email address.  Updated to handle
this.
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 24, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a704debc-9831-4729-9290-576fb2f9a10c

📥 Commits

Reviewing files that changed from the base of the PR and between a6bcd3c and b91f506.

📒 Files selected for processing (1)
  • jira-scripts/network_bugs_overview

Walkthrough

The pull request refactors Jira assignee handling in the network bugs overview script by introducing a new ACCOUNT_ID_TO_USERNAME mapping to translate Jira Cloud account IDs to standard usernames. It updates assignee extraction logic for both stories and bugs to use this mapping, replaces legacy prefixed identifiers (rhn-support-, rh-ee-) with direct usernames across mappings, and reworks PX score retrieval to safely access an alternative custom field with error handling.

Changes

Cohort / File(s) Summary
Jira Assignee Mapping & Constants
jira-scripts/network_bugs_overview
Added ACCOUNT_ID_TO_USERNAME mapping constant to translate Jira Cloud accountIds to usernames; updated RH_DEVELOPERS and GITHUB_TO_JIRA_USERS constants to use username values instead of legacy prefixed forms (rhn-support-, rh-ee-).
Assignee Extraction Logic
jira-scripts/network_bugs_overview
Updated Jira story assignee extraction to store mapped usernames (with accountId fallback); updated bug processing to read assignee via bug.get_field("assignee"), map accountId using ACCOUNT_ID_TO_USERNAME, and default to EXTERNAL_JIRA_ASSIGNEE when no mapping exists.
PX Score Retrieval
jira-scripts/network_bugs_overview
Reworked print_unassigned_bugs() to access PX score via bug.fields.customfield_11003 using getattr with safe int conversion and error handling; prints "no px score" when field is missing or unparseable.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jira-fix-px-score

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci bot requested review from miheer and tssurya March 24, 2026 14:59
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 24, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: knobunc

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 24, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 24, 2026

@knobunc: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant