# Error while integrating Labels to Tags

**URL:** <https://community.exalate.com/t/error-while-integrating-labels-to-tags/5406>\
**Category:** General Questions\
**Tags:** exalate, cloud-jira, azuredevops, migrated\_question\
**Created:** [November 4, 2024, 8:02am UTC](https://community.exalate.com/t/error-while-integrating-labels-to-tags/5406 "2024-11-04T08:02:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)\
**Post date:** [November 4, 2024, 8:02am UTC](https://community.exalate.com/t/error-while-integrating-labels-to-tags/5406/1 "2024-11-04T08:02:51Z")

</div>

_Originally asked by Gaurav Gupta on 02 February 2023 [(original question)](https://oldcommunity.exalate.com/questions/58498966)_

* * *

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

* * *

---

<div class="post-metadata">

**Author:** ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)\
**Post date:** [November 4, 2024, 8:02am UTC](https://community.exalate.com/t/error-while-integrating-labels-to-tags/5406/2 "2024-11-04T08:02:52Z")

</div>

_Answer by Support on 02 February 2023_

Hi Gaurav Gupta ,

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

```auto
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

* * *

#### Comments:

> **Gaurav Gupta commented on 03 February 2023**
>
> > 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

> **M. Ashar Iqbal commented on 03 February 2023**
>
> > Hi Gaurav Gupta ,
> 
> You can also add ‘[Script](https://docs.exalate.com/docs/scripts-in-visual-mode)’ 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

> **Gaurav Gupta commented on 06 February 2023**
>
> > Hello Support M. Ashar Iqbal
> 
> The script is not working at all. Is there any other way to achieve this?
> 
> Thanks & Regards
> 
> Gaurav Gupta

> **M. Ashar Iqbal commented on 06 February 2023**
>
> > Hi Gaurav Gupta , may I please request you to open a Support ticket with the [Support Zip file](https://docs.exalate.com/docs/how-to-generate-supportzip-file) from both Instances _(source + destination)_?
> 
> Thank you,
> 
> Ashar

> **Gaurav Gupta commented on 10 February 2023**
>
> > 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

> **M. Ashar Iqbal commented on 10 February 2023**
>
> > Thank you, Gaurav Gupta .
> 
> We can continue our conversation in the ticket you have created.
> 
> Regards,
> 
> Ashar
