Note
We've packed up and moved from Confluence to Discourse to bring you a better, more interactive space. Out of courtesy we didn't migrate your user account so - you will have to signup again
The Exalate team will be on holiday for the coming days - returning Jan 4
Enjoy & stay safe
Dear sir,
I have a use case as below:
Remote server will sync all the lables which contains "mustfix". eg, sop_mustfix, mustfix_xxx, xxx_mustfix_yyy.
Our local incoming script need add prefix "sync_" to all the labels. How to implement it?
remote Local
sop_mustfix, mustfix_xxx, xxx_mustfix_yyy sync_sop_mustfix, sync_mustfix_xxx, sync_xxx_mustfix_yyy
if(replica.labels.collect{it.label}.contains("mustfix")){
issue.labels += replica.labels.collect { it.label = it.label.replace(" ", "sync_"); it } //I do not know how to add the prefix here
}
else //if remote delete the label, we also need delete
{
if( (replica.labels.label.join(" ")=="") && (issue.labels.findAll { it.label.contains("sync_") }) )
issue.labels = issue.labels-nodeHelper.getLabel("????") //I do not know how to clear the lable
}
Best regards,
Helen