Skip to content

SREP-4720: fix stale jira custom fields#929

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
rolandmkunkel:SREP-4720-fix-stale-jira-custom-fields
Apr 28, 2026
Merged

SREP-4720: fix stale jira custom fields#929
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
rolandmkunkel:SREP-4720-fix-stale-jira-custom-fields

Conversation

@rolandmkunkel
Copy link
Copy Markdown
Contributor

@rolandmkunkel rolandmkunkel commented Apr 27, 2026

                                                                                                                                                                                                                                                                                                               ### What type of PR is this?                                                                                                                                                                                                                                                                                    
  • fix (Bug Fix)
  • feat (New Feature)
  • docs (Documentation)
  • test (Test Coverage)
  • chore (Clean Up / Maintenance Tasks)
  • other (Anything that doesn't fit the above)

What this PR does / Why we need it?

After the migration to Atlassian Cloud, the Jira custom field ID for Cluster ID (customfield_12316349) no longer exists. The formatIssue() function in the OHSS service reads the Cluster ID from this field, which always returns null/empty. This means any code relying on OHSSIssue.ClusterID always
gets a blank value.

This PR updates the constant to the correct field ID (customfield_10852) as confirmed via the Jira REST API.

A corresponding fix for osdctl (which has the same issue plus two additional stale field IDs) will be submitted separately.

Which Jira/Github issue(s) does this PR fix?

Special notes for your reviewer

The old field ID customfield_12316349 became stale after the Atlassian Cloud migration. Verified against multiple OHSS tickets (OHSS-52710, OHSS-53044) that the old ID returns null while the new ID (customfield_10852) returns the correct Cluster ID value.

JQL-based searches are not affected by this bug because they use the human-readable field name "Cluster ID", which Jira resolves correctly at query time. Only direct field access via the API response is broken.

Unit Test Coverage

  • Added unit tests
  • Created jira card to add unit test
  • This PR may not need unit tests

Pre-checks (if applicable)

  • Ran unit tests locally
  • [] Validated the changes in a cluster
  • Included documentation changes with PR
  • Backward compatible

Summary by CodeRabbit

  • Chores
    • Updated internal field mapping to ensure correct data retrieval and issue formatting.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Apr 27, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Apr 27, 2026

@rolandmkunkel: This pull request references SREP-4720 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.0.0" version, but no target version was set.

Details

In response to this:

                                                                                                                                                                                                                                                                                                              ### What type of PR is this?                                                                                                                                                                                                                                                                                    
  • fix (Bug Fix)
  • feat (New Feature)
  • docs (Documentation)
  • test (Test Coverage)
  • chore (Clean Up / Maintenance Tasks)
  • other (Anything that doesn't fit the above)

What this PR does / Why we need it?

After the migration to Atlassian Cloud, the Jira custom field ID for Cluster ID (customfield_12316349) no longer exists. The formatIssue() function in the OHSS service reads the Cluster ID from this field, which always returns null/empty. This means any code relying on OHSSIssue.ClusterID always
gets a blank value.

This PR updates the constant to the correct field ID (customfield_10852) as confirmed via the Jira REST API.

A corresponding fix for osdctl (which has the same issue plus two additional stale field IDs) will be submitted separately.

Which Jira/Github issue(s) does this PR fix?

Special notes for your reviewer

The old field ID customfield_12316349 became stale after the Atlassian Cloud migration. Verified against multiple OHSS tickets (OHSS-52710, OHSS-53044) that the old ID returns null while the new ID (customfield_10852) returns the correct Cluster ID value.

JQL-based searches are not affected by this bug because they use the human-readable field name "Cluster ID", which Jira resolves correctly at query time. Only direct field access via the API response is broken.

Unit Test Coverage

  • Added unit tests
  • Created jira card to add unit test
  • This PR may not need unit tests

Pre-checks (if applicable)

  • Ran unit tests locally
  • [] Validated the changes in a cluster
  • Included documentation changes with PR
  • Backward compatible

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 openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: c9147261-a71f-490e-b5cb-0a18bdfcdb80

📥 Commits

Reviewing files that changed from the base of the PR and between c372261 and dea27d2.

📒 Files selected for processing (1)
  • pkg/jira/ohssService.go

Walkthrough

Updates the CustomFieldClusterID constant identifier from customfield_12316349 to customfield_10852 in the Jira OHSS service module, changing how the cluster ID field is retrieved from Jira issue data.

Changes

Cohort / File(s) Summary
Custom Field Identifier Update
pkg/jira/ohssService.go
Updated CustomFieldClusterID constant from "customfield_12316349" to "customfield_10852" to reference the correct Jira custom field identifier.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: updating stale Jira custom field identifiers after Atlassian Cloud migration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci openshift-ci Bot requested review from feichashao and xiaoyu74 April 27, 2026 16:06
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 27, 2026

@rolandmkunkel: 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.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.97%. Comparing base (c372261) to head (dea27d2).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #929      +/-   ##
==========================================
- Coverage   54.00%   53.97%   -0.04%     
==========================================
  Files          88       88              
  Lines        6662     6662              
==========================================
- Hits         3598     3596       -2     
- Misses       2596     2597       +1     
- Partials      468      469       +1     
Files with missing lines Coverage Δ
pkg/jira/ohssService.go 80.64% <ø> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bergmannf
Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Apr 28, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 28, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bergmannf, MitaliBhalla, rolandmkunkel

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 Apr 28, 2026
@openshift-merge-bot openshift-merge-bot Bot merged commit 14f1ee2 into openshift:main Apr 28, 2026
9 checks passed
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. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants