Can you please inform us how to do the mapping process for issue types for JIRA and Azure DevOps side?

Suppose we have one issue "task" which has three states like open, resolved, and closed.

so, we need one to many mapping processes:

task --> open,
task --> resolved
task --> closed

I am adding states mapping.xlsxa detailed mapping. In a column, B is the status that comes from JIRA, and in a column, C is the status that we want to have in ADO. The issue is, that somehow we need to distinguish states within different types of issues. In practice, we need to have a mapping for tasks, mapping for the user stories, and mapping for the bug. How should we extend the script?

    CommentAdd your comment...

    1 answer


      In the incoming sync on your ado side you can have multiple maps, one for each issue type.

      Something like

      incoming ADO - untested
      def statusMappingTask = [
          "Open" : "To do",
          "In Progress":"In Progress",
          "Done" : "Closed",
      def statusMappingStory = [
          "Open" : "Triage",
          "In Progress":"Doing",
          "Done" : "Done",
      def targetStatus = "Open"
      if (issue.type.name == "Task") {  targetStatus = statusMappingTask[replica.status.name] ?: "Open"}
      if (issue.type.name == "Story") {
        targetStatus = statusMappingStory[replica.status.name] ?: "Open"
      1. Joanna Kwiatek Tokarz


        We have an error:

        incoming sync: first sync error
        Script error details: Cannot get property 'name' on null object. Error line: Script20.groovy:154

        Nov 12, 2020 14:28:41

      2. Francis Martens (iDalko)

        When syncing for the first time, issue.type is not set (as the issue doesn't exist yet)

        You will have to construct the processor to take that into account.

      CommentAdd your comment...