3 answers
- 210
Yes, this should be very possible. The trick here is to only allow a status change in Jira when you want it. Something on the lines of the following code snippet (not tested) should do the job:
def statusMap = [ "open" : "Open", "solved" : "Done" ] def remoteStatusName = replica.status.name if (remoteStatusName == "open" || remoteStatusName == "solved") issue.setStatus(statusMap[remoteStatusName]
Please let me know how it goes.
Thanks
Majid
Add your comment... - 10-1
No, in fact I left the bold part out on purpose. This is the default value that the system relies on if it does not find a match in the map you created. I would personally not include it from the initial description you provided, but if you are all set, that is great to hear!
Thanks
Majid
Add your comment... - 10-1
Thanks Syed Majid Hassan , it seems working, I believe you forgot to add the bold part in the below code, by using it its working.
Code: issue.setStatus(statusMap[remoteStatusName] ?: remoteStatusName)
Add your comment...
Current flow: ZD → Jira. All statuses in ZD need to map with the status in Jira.
Use case: I only want, "Open" and "Solved" statuses from ZD to be mapped to "Open" and "Done" status in Jira, but while doing so, in the rest of the status I am getting errors and the ticket is not syncing.
Please suggest, if that could be possible.