1
0
-1

Hi,

Is there a way to merge the labels of two issues in the connection? I need the same mechanism of mergeComments() or mergeAttachments() just in labels.

Thanks.

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hello Yaakov Shamii


      Here is an example of merging 2 string arrays.  Performance wise not the best option, but I assume that the issues number of labels is limited


      def leftArray = [ "a", "b", "c" ]
      def rightArray = ["b","d","e"]
      
      
      leftArray.addAll(rightArray.findAll {label -> ! leftArray.contains(label)})
      
      assert leftArray == [ "a", "b", "c", "d", "e"]
      
      
      CommentAdd your comment...