1
0
-1

Hello,


currently my Exalate connection synchronizes the status for every change made to a ticket.

Now I would like to change it in such a way that the synchronization happens only if the last change/update to the issue was an update to a specific status.


So the pseudo code would be:

if(status changed in last update to “In Progress”){

update status

}


How can I achieve this (on Jira Server)?


Thank you

Johannes

    CommentAdd your comment...

    1 answer

    1.  
      2
      1
      0

      The replica represents the payload arriving from the remote end. 

      Similarly, previous represents the last copy of the replica, 

      and you should be able to use these to achieve what you are looking for. 


      For instance, if you want to change status only if the status on the remote end changed to X, you would:


      if (replica.status.name == "X" && previous.status.name != "X")
      
              update status



      Some more reading on the subject is here

      If this resolves the issue, please mark the answer as accepted. 


      Happy Exalating!

      Majid


      1. Johannes

        Thank you, that is exactly what I was looking for!

      CommentAdd your comment...