2
1
0

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. 

Jira Complex ->Jira Normal ->DevOpsJira Complex <-
NewNewNewNew
PlanningIn ProgressActivePlanning (No change if: Ready For Development, Development In Progress, Ready For Code Review, Ready For Testing, Testing In Progress)
Ready For Development
Active
Development In Progress
Active
Ready For Code Review
Active
Ready For Testing
Active
Testing In Progress
Active
TestedResolvedResolvedTested (No change if: Acceptance In Progress, Accepted, Documented)
Acceptance In Progress
Resolved
Accepted
Resolved
Documented
Resolved
ClosedClosedClosedClosed
ReopenedReopenedActiveReopened


RemovedNo Change

Could you please provide me a best way how to do it?

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -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 statements

      def 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 using 

      def 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

      1. 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

      2. 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 edit



        In 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



      CommentAdd your comment...