We hope to provide Workflow Validation, Condition and Post Function in the near future. In the meantime please use the following workarounds to add and delete using Jira Automation
Add & Remove Label Manager items through a workflow transition without overwriting existing label
Example Usecase:
When the status changes to from status “In Progress” to Done add the Label “label1” in “red” to the Label Manager custom field “DoD” IN-UAT and remove the Label UAT-Done for your field Label .
Trigger: Issue Transitioned → Select From And/Or To Status
If: Check that the label is not yet selected.
Use “Advance compare Condition”
Use the Smart value {{<labelManagerFieldName>.labels}} and check ‘does not contain’ <labelName>
...
Edit Issue: New Action → Edit Issue
...
Add the following code into the field. Replace ‘DoD’ customfield-ID with your Label Manager Field Name customfield-ID.
Code Block |
---|
{ "fields": { "DoD "update": { "labelscustomfield_10042": [{{#DoD.labels}}"{{.}}",{{/}}"label1"], "colors": [{{#DoD.colors}}"{{.}}",{{/}}"red"], "labelSource"remove": "{{DoD.labelSource}}" } } } |
Replace ‘label1’ with the color you want the new label to have.
Color options: ‘red’, ‘orange’, ‘green’, ‘grey-light’
If you want no color, you still need to add ‘grey-light’ here
Delete Label Manager items through a workflow transition
Example Usecase:
When the status changes to “In Progress” delete all labels selected in the Label Manager custom field “DoD”
Trigger: Issue Transitioned → Select From And/Or To Status
Edit Issue: New Action → Edit Issue
Use ‘More options’
Add the following code into the field. Replace ‘DoD’ with your Label Manager Field Name.
Code Block |
---|
{ "fields": { "DoD": {IN-UAT" }, { "labels": [], "colorsadd": [],"UAT-Done" } ] "labelSource": "{{DoD.labelSource}}" } } } |
...
Delete Label Manager items through a workflow transition
Need help?
Please raise an issue in our Help Center in case of questions or to report a bug, we are here to support you.