I have a rule to remove the labels fields whenever an issue is edited. I want to remove the label field only if it starts with a certain string, ex- abc.
So if I have two labels, abc-123 and pqr-234, the rule should remove the abc-123 from labels list. I have a tried a lot of different smart values in rule advance json but it ends in json error.
How to achieve it?
Hi @priyank_agrawal -- Welcome to the Atlassian Community!
There is no smart value function to remove one item from a list field yet. The work-around I found was to use string, list, and create variable handling:
If you instead want to update Labels with advanced editing JSON, change the above step (2) to format in the JSON syntax, and change step (4) to leave the item as a string.
Try this, and if you need more details, here is a step-by-step for how to do this with Component replacement. The same method should work for Labels.
Here is the documentation on advanced field editing with JSON, the string functions, and the list functions I used to do this:
https://support.atlassian.com/jira-software-cloud/docs/advanced-field-editing-json/
https://support.atlassian.com/jira-software-cloud/docs/smart-values-text-fields/
https://support.atlassian.com/jira-software-cloud/docs/smart-values-lists/
Best regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.