1
0
-1

Hello All,


We are using the visual option to setup the configuration between Jira cloud and Azure DevOps and have defined Jira Labels to sync with Tags in Azure DevOps.

It is working fine generally, but throws an error when the Jira Label starts with a blank space.

As Jira Label is a free text space, is there any way to manage this with the visual setup?

Error Detail Message:

Could not update issue `IT-7922` with id `18014`: Field labels: The label ' US' can't contain spaces.


Thanks & Regards

Gaurav Gupta

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hi Gaurav Gupta ,

      This is unfortunately a known bug, but we have a temporary solution.


      if(executionInstanceName == "ADO")
      {
          def allLabels = JC.issue.labels
      
          ADO.issue.labels=allLabels.collect{
      label->
      def l = new com.exalate.basic.domain.hubobject.v1.BasicHubLabel()
      l.setLabel(label.value.replace(" ", "_"))
      l
          
      }

      Could you please try this solution, and let me know if it does not work?

      Thank you,

      Ashar

      1. Gaurav Gupta

        Hello Ashar Iqbal , Harold Oconitrillo 


        Thanks for the quick response. Kindly guide me where this solution needs to be applied.

        Also, is it possible to simply trim the Jira Label using the groovy script option?


        Thanks & Regards

        Gaurav Gupta

      2. M. Ashar Iqbal

        Hi Gaurav Gupta ,

        You can also add 'Script' under 'Rules > Add mapping > Add script' for the 'Visual Connection'. You can add the previously shared Snippet in there.

        Please feel welcomed to raise a Support ticket for this issue if the workaround does not work.

        Thank you,

        Ashar

      3. Gaurav Gupta

        Hello Support M. Ashar Iqbal 


        The script is not working at all. Is there any other way to achieve this?


        Thanks & Regards

        Gaurav Gupta

      4. M. Ashar Iqbal

        Hi Gaurav Gupta , may I please request you to open a Support ticket with the Support Zip file from both Instances (source + destination)?


        Thank you,

        Ashar

      5. Gaurav Gupta

        Hello M. Ashar Iqbal 

        The script worked from the Jira side but is still failing from the ADO side to JSM. I have crated EASE-20180 for this purpose.

        Kindly help on this.


        Thanks & Regards

        Gaurav Gupta

      6. M. Ashar Iqbal

        Thank you, Gaurav Gupta .

        We can continue our conversation in the ticket you have created.

        Regards,

        Ashar

      CommentAdd your comment...