We are facing an issue with status mapping between our two Jira instances RD PET (Source) and USHWM (Destination) while using Exalate for synchronization. The status transitions are not being applied correctly based on our requirements.
We need to ensure that only the following status transitions apply:
RD PET Status Change → USHWM Status Update
"In Progress"
→"Closed"
→ Should set “Resolved”"Closed"
→"In Progress"
→ Should set “Reopened”- All other transitions should remain unchanged.
What Should NOT Happen:
"To Do"
→"In Progress"
→ Should NOT set “Reopened” (Currently, this is happening)"Cancelled"
→"In Progress"
→ Should NOT set “Reopened”- Any other status change should remain as-is. //outgoing sync rdpet
replica.status = issue.status
//incoming on ushwm side
def statusMap = [
“Closed”: “Resolved”,
“In Progress”: “Reopened”
]
// Get the remote status name received from RD PET
def remoteStatusName = replica.status.name
issue.setStatus(statusMap[remoteStatusName] ?: “Open”)