1
0
-1

Hello Support Team


We have the problem that when updating the ticket on the remote side,
the "destination-Labels" field is updated even if there is no update of the "source_Labels" field on the replica site.The field is updated with an empty value.
What is the reason for this update and how to stop the empty updates?

here is my code.


issue.customFields."destination-Labels".value = [nodeHelper.getLabel("")]
replica.customFields."source_Labels"?.value?.split(', ')?.each

{     issue.customFields."destination".value += nodeHelper.getLabel(it) }


Best regards
Ezadin Mahmoud

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Following statement is clearing the destination-Labels field

      issue.customFields."destination-Labels".value = [nodeHelper.getLabel("")]

      Remove it and see if that solves the problem



      1. Ezadin Mahmoud

        Hello Francis,


        Thank you for the Answer


        After deleting the line, I noticed this update behavior.


        1.  The deletion caused the empty update to stop.
        2. On the source side, when the "source_Labels" is changed from Label1 to Label2, the "destination_Labels" is updated to Lable1 Label2.
          This is not a correct behavior. The "destination_Labels" should be changed to Lable2, not Label1 Label2.
        3. If you delete the value of "source_Labels" on the source_side, the value of "destination_Labels" is not deleted and still has the old value Lable1 Label2.


        So after deleting the line, "destination_Labels" gets a different value than on the "source_Labels" and that doesn't need to be, "source_Labels" and "destination_Labels" must have the same value.
        So I think the code itself is correct, but it must only be executed if there really is an update.


        Best regards

        Ezadin

      CommentAdd your comment...