1 answer
- 10-1
You can create a map in groovy this way
def workflowMapping = [ // Rmote issue status -> Local issue status "Open" : "Open", "Waiting for development" : "In Progress", "Action Required" : "Awaiting Feedback", "To review" : "Resolved", "Closed" : "Closed", ]
And then update the ADO state with following set of statementsdef targetStatusName = workflowMapping[replica.status.name] workItem.status = targetStatusName
Of course it could be that either the status is not in the message sent to ADO, or that the mapping doesn't have the right entry - so to be safe you can fall back to a default by usingdef targetStatusName = workflowMapping[replica.status?.name] ?: "Default" workItem.status = targetStatusName
- replica.status?.name is using the groovy safety operator and will return null if replica.status is not provided
- workflowMapping[<expression>] will become null if the index value is null or not found
- <expression> ?: "Default" will return Default if expression is null
Hope this helps
- Kunal Ghosh
Hi Francis,
I would like to thank you for your help. Can you please inform us about the steps for adding those scrips form Azure Devops portal.
Thanking you in advance.
Best Regards,
Kunal Ghosh
- Francis Martens (Exalate)
Well, you have to add these to the connection, which you can find in the exalate console. The exalate console can be accessed through ADO > Organization Settings > Extensions.
The connection is one of the side menu. Find it, and then in the connection list find the appropriate connection to editIn there you will find the rules editor where you can specify what information can be sent to the other side (outgoing processor) and how incoming messages need to be processed (incoming processor)
The incoming sync is where you would apply this type of configuration
Hope this helps
Francis
PS - Exalate has quite a bit of partners that know how to configure synchronisations.
You might consider engaging with one of them - the list can be consulted on the exalate.com/partners
Add your comment...
Hello,
I would like to prepare a mapping between statuses in JIRA and statuses in ADO. Currently, most of the tickets sent from Jira to ADO are in-state New as in Jira we have more statuses than in ADO.
Could you please provide me a best way how to do it?