fix: use current status for issue transitions instead of first changelog entry (Issue #140)#152
Conversation
…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>
SummaryThis PR adds a missing What reviewers should knowWhat to verify:
Context for reviewers:
|
|
Hi @okorach @okorach-sonar , Would this logic be correct?
This is for the Issue here: "Use current status for issue transitions instead of first changelog entry" |
|
ok wait, I checked your other code, seems to be the case / and looks correct. let me merge this in |

Summary
FIXEDcase inissue-status-mapper'sgetFallbackTransitionswitch statementsq-2025pipeline'sissue-status-mapperwas inconsistent withissue-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.jsinsq-2025was missingcase 'FIXED': return 'resolve';in its switch statement. This made it inconsistent with:issue-syncversion which already hadFIXEDAnalysis
The active
issue-synccode already correctly usessqIssue.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 theissue-status-mapperhelper is consistent and handles theFIXEDstatus correctly when used as a fallback.Test plan
syncIssues applies a single transition derived from current SQ status, ignoring older changelog states (#140)docs/regression-testing.md)🤖 Generated with Claude Code