1
0
-1

Hi team,

I’m working on synchronization between 2 Jira projects (same instance). Everything was working fine until I bumped into the status sync. For example here is the scenario → In the source project a have a set of statuses and in the destination project I have another set and some of them aren’t the exact match. So I went ahead and defined the status map as following:

========================================================

def statusMap = [
"Waiting for Approval": "Waiting for IZ Approval",
"Waiting for Approval": "Waiting for AX Approval",
"In Progress": "Code Review",
"Ready for QA Deployment": "In Progress",
"Blocked Testing": "In Progress",
"Ready for Test": "In Progress",
"Testing": "In Progress",
"Ready for Acceptance": "Ready for IZ Acceptance",
"Ready for Acceptance": "Ready for PQA deployment",
"Ready for Acceptance": "Ready for AX Acceptance",
"Ready for Acceptance": "Ready for MKT/CPL Acceptance"
]
def remoteStatusName = replica.status.name
issue.setStatus(statusMap[remoteStatusName] ?: remoteStatusName)


=========================================================


To give more clarification - the way I'm trying to map is the following: 

"Waiting for Approval (Target Project)"  :   "Waiting for IZ Approval (Source Project)"


Error I'm getting: "Can not find status `Waiting for IZ approval` in workflow `LXP Story Workflow (v2)`. You might want to map status Waiting for IZ approval to a existing status in your workflow for the issue"


Thanks in advance.

-E


    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      It could be a small mistake I think. 

      In mappings such as the following:

      "a" : "b"

      the first entry always corresponds to the remote system i.e. the sender, and the second value is the value you want the target issue to change to. 


      Am I reading this wrong, or have you got this configured the other way around?


      Thanks

      Majid


      1. Eugene A

        Hi Majid,


        Yes it looks like I got them mixed up. I was able to play around and make a few adjustments and got it to work.


        Thanks,

        Eugeniu

      2. Syed Majid Hassan

        Hi Eugene A,

        Glad that it worked!

        Can i request you to mark the answer as Accepted to close the thread please

        Thanks

        Majid


      CommentAdd your comment...