Skip to content

fix: use current status for issue transitions instead of first changelog entry (Issue #140)#152

Merged
joshuaquek merged 1 commit into
mainfrom
fix/issue-140-issue-changelog-order
May 7, 2026
Merged

fix: use current status for issue transitions instead of first changelog entry (Issue #140)#152
joshuaquek merged 1 commit into
mainfrom
fix/issue-140-issue-changelog-order

Conversation

@joshuaquek

@joshuaquek joshuaquek commented May 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Fix missing FIXED case in issue-status-mapper's getFallbackTransition switch statement
  • The sq-2025 pipeline's issue-status-mapper was inconsistent with issue-sync (which already handled this correctly) and other pipeline versions (sq-9.9, sq-10.0, sq-10.4)

Root Cause

The issue-status-mapper/helpers/get-fallback-transition.js in sq-2025 was missing case 'FIXED': return 'resolve'; in its switch statement. This made it inconsistent with:

  • The issue-sync version which already had FIXED
  • All other pipeline versions (sq-9.9, sq-10.0, sq-10.4)

Analysis

The active issue-sync code already correctly uses sqIssue.status (current/last status) rather than replaying the first changelog entry. The bug description in Issue #140 ("first status change" vs "last status change") was already addressed in the main sync path. This fix ensures the issue-status-mapper helper is consistent and handles the FIXED status correctly when used as a fallback.

Test plan

  • Unit test passes: syncIssues applies a single transition derived from current SQ status, ignoring older changelog states (#140)
  • Regression test with live SonarQube/SonarCloud (per docs/regression-testing.md)

🤖 Generated with Claude Code

…log entry (Issue #140)

The issue-status-mapper's getFallbackTransition was missing the FIXED case
in its switch statement, making it inconsistent with the issue-sync version
and other pipeline versions (sq-9.9, sq-10.0, sq-10.4).

The active issue-sync path already correctly uses sqIssue.status (the current
status) via getFallbackTransition(), not the first changelog entry. This fix
ensures the issue-status-mapper helper is consistent and handles the FIXED
status correctly when used as a fallback.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@sonar-review-alpha

Copy link
Copy Markdown

Summary

This PR adds a missing case 'FIXED' to the status-to-transition mapping in the sq-2025 pipeline's fallback handler. The change is a one-line addition that maps the FIXED status to a resolve transition, bringing sq-2025 into alignment with issue-sync and other pipeline versions (sq-9.9, sq-10.0, sq-10.4). Without this case, issues with a FIXED status would fall through to the default handler and return null, preventing correct Jira transitions.

What reviewers should know

What to verify:

Context for reviewers:
This is a small consistency fix. The bug manifested in the fallback path (when issue-sync isn't used), which is why it wasn't caught earlier. The default sync path already used the correct current status. Focus on ensuring the mapping is consistent across all pipeline variants.


  • Generate Walkthrough
  • Generate Diagram

🗣️ Give feedback

@joshuaquek

Copy link
Copy Markdown
Collaborator Author

@joshuaquek

Copy link
Copy Markdown
Collaborator Author

ok wait, I checked your other code, seems to be the case / and looks correct. let me merge this in

@joshuaquek
joshuaquek merged commit f3b06fd into main May 7, 2026
1 check failed
@joshuaquek
joshuaquek deleted the fix/issue-140-issue-changelog-order branch May 7, 2026 05:57
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.

1 participant