Originally asked by V. Hong on 16 January 2021 (original question)
Instance one
Incoming Sync
def statusMapping = [
“Stakeholder Review” : “Ready For Review”
]
def defaultStatus = “Planning”
def statusName = statusMapping[replica.status?.name] ?: defaultStatus
Instance 2
Incoming Sync
def statusMapping = [
“Ready For Review” : “Stakeholder Review”
]
def defaultStatus = “To Do”
def statusName = statusMapping[replica.status?.name] ?: defaultStatus
Name of Status found on both instances
Copy pasted from Workflow → Workflow Step → Workflow Step Properties
Instance 1
Stakeholder Review
Instance 2
Ready For Review
Whenever I change the status to ‘Stakeholder Review’ → ‘To Do’ status instead of ‘Ready For Review’ and vice versa on the other instance when pointing to ‘Ready For Review’’ → ‘Planning’
Where am I going wrong here?
Comments:
André Leroy-Beaulieu Castro commented on 18 January 2021
Hi Vinh,
Thanks for raising this community questions!
Are you using the line:
issue.setStatus(statusName)
After the blocks of code you sent?
are there steps between the initial statuses you are on and the desired status (Stakeholder Review, or Ready For Review, depending on the instance) in the respective workflows?
Thanks,
André
V. Hong commented on 18 January 2021
I’m not using said line
issue.setStatus(statusName)
For initial status for both issues it is In Progress
Both are able to transition to Stakeholder Review and Ready For Review.
André Leroy-Beaulieu Castro commented on 18 January 2021
Hi Vinh,
So can I get screenshots of the full scripts for Incoming Sync on both sides?
Thanks,
André
V. Hong commented on 18 January 2021
here you go
André Leroy-Beaulieu Castro commented on 19 January 2021
Could you try replacing line 56 and 68 respectively with:
issue.setStatus(statusName)
Thanks,
André
V. Hong commented on 19 January 2021
I have swapped out the lines and tried transitioning the status from ‘In Progress’ → ‘Stakeholder Review’ but on the opposing instance it just transitions back to ‘To Do’