1
0
-1

Hi,


How can you ignore/exclude a specific status from the statusMapping? We have Azure DevOps statuses that don't need to sync back to a status in Jira. And because statuses can be changed in Azure DevOps without following a workflow (unlike Jira), it's impossible to assume a Jira status to map it to (eg. state of 'Further Information' could be chosen at any point).


Cheers! 

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      You would do this:

      //Incoming:
      def statusMap = [
                  "Done": "Resolved",
                  "In Progress": "In Action"
      ]
      def localStatus = statusMap[replica.status.name]
      if(localStatus){
        issue.setStatus(localStatus)
      }

      This would only apply statuses that are on the mapping.

      1. Stephen Sayler

        Would this also work for resolutions? e.g.


        //Incoming: 
        def resolutionMap = [
                    "Done": "Done",
                    "Won't Do": "Canceled"
                    "Duplicate": "Canceled"
                    "Cannot Reproduce": "Canceled"
                    "Incomplete": "Canceled"
        ]
        def localResolution = resolutionMap[replica.resolution.name]
        if(localResolution){
          issue.setResolution(localResolution)
        }
      CommentAdd your comment...