Confluence has been updated to ver 6.15.9. In case of any troubles, please contact infra team.

Questions

 
1
0
-1

i have two project in Jira cloud for example Project SD and Project IT .

and i need to call a transition when the replica status== Done and replica.resolution== wrong project

in the project HD.

the info about replicas are of the project IT


i try it creating a mapping status but i have  some error and i think if is possible the next solution:



example:


outgoing sync

Issue.status=Replica.status




incoming sync:


I think if possible to save the status in the constant (Status)


def Status = nodeHelper.getStatus(replica.status?.name)

if ( Status== "Done") {
   if ( replica.resolution.name == "Wrong Project") {
      workflowHelper.transition (issue, "De-Escalate Issue (Auto)")
   }

else 
   if ( replica.resolution.name != "Wrong Project") {
      workflowHelper.transition (issue, "Resolve Issue (Auto)")
   }
}



all the script dont have error but no call the transition
i'm not sure if is ok when i save the status in the constant


if you have some idea o suggestion tell me?


Thanks

  1. Francis Martens (iDalko)

    I changed the layout a bit for readability

CommentAdd your comment...

1 answer

  1.  
    1
    0
    -1

    The reason why there is no transition is because the getStatus is a status object and not the name of the status


    If you adapt the code to


    def status = nodeHelper.getStatus(replica.status?.name)
    
    if (status?.name == "Done") 
    ...

    It will work.


    Note also that you might as well do

    if (replica.status?.name == "Done") 
    ...


    Because the name of the status returned by getStatus is the same

      CommentAdd your comment...