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.
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
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’ 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 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.