1
0
-1

I have 2 instances for example instansce A is jira cloud and Instancia B is jira server try to sync the resolution i use a map of resolution.

i need to to call a post funtion after of the replica resolution is (wrong Project) i try that with the next script but that no funtion .


if (replica.resolution == null && issue.resolution != null) {
// if the remote issue is not resolved, but the local issue is set, then clear 	the local issue resolution

issue.resolution = null
}


def WR = nodeHelper.getResolution(replica.resolution.id) 

if (replica.resolution != null) {
// the remote issue is resolved, but the local isn't - look up the correct local resolution object.


def resolutionMap = [

"Done" : "Done",
"Done" :"Fixed",
"Duplicate":"Duplicate",
"Cannot Reproduce":"Cannot Reproduce",
"Won't Do" :"Won't Do",
"Won't Fix" :"Won't Do" ,
"Wrong Project" :"Won't Do"



]


// use 'done' as resolution if the remote resolution is not found
def targetResolutionName = resolutionMap[replica.resolution.name] ?: "Done"



// nodeHelper.getResolution looks up the local resolution object based on the provided name
issue.resolution = nodeHelper.getResolution(targetResolutionName)

}



if(issue.resolution == "Won't Do" && replica.resolution== "Wrong Project" ){
  workflowHelper.transition(issue, "Resolve Issue")
}




if you have some recomendation tell me ?



    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      So the resolution is set but the transition is not performed? Or nothing is happening at all?

        CommentAdd your comment...