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 Label Manager items through a workflow transition without overwriting existing label
Example Usecase:
When the status changes to “In Progress” add the Label “label1” in “red” to the Label Manager custom field “DoD”
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
Use ‘More options’
Add the following code into the field. Replace ‘DoD’ with your Label Manager Field Name.
{ "fields": { "DoD": { "labels": [{{#DoD.labels}}"{{.}}",{{/}}"label1"], "colors": [{{#DoD.colors}}"{{.}}",{{/}}"red"], "labelSource": "{{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.
{ "fields": { "DoD": { "labels": [], "colors": [], "labelSource": "{{DoD.labelSource}}" } } }
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.