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.
...
Automate Your Colored Label Fields with Jira Automation 🤖
Tired of manually updating labels in Jira? With Automation Rules, you can dynamically manage and update your Colored Label Fields based on issue transitions, field changes, or other triggers.
- Let’s explore how to set this up with a practical example.
Example Use Case: Automation with Colored Label Field
Scenario
When an issue’s status changes from “In Progress” to “Done”, We want to:
Add the label “100% worked”.
Clear the existing data in the “Progressing” field.
Steps to Create the Automation Rule
Navigate to Automation Settings
Click on Project settings → Click on Automation → Click Create rule.
Select the Trigger
Choose Issue Transitioned as the trigger.
Set From: In Progress → To: Done, then click Next.
Add an Action
Click Add an action.
Select Edit Issue.
...
Modify the Field Data
Click Use ‘More options’.
Add the following JSON code into the field to replace the data in Progressing with "100% worked":
...
Code Block |
---|
{ "update": { "Progressing": [ "labels": [{{#DoD.labels}}"{{.}}",{{/}}"label1"], "colors": [{{#DoD.colors}}"{{.}}",{{/}}"red"],"set": null }, "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.
Code Block |
---|
{ "fields": { "DoD": { "labels"add": [], "100% worked" } "colors": [], } "labelSource": "{{DoD.labelSource}}" } } } |
...
}
|
Click update
...
Testing the Rule
Create an issue and set any value in the Colored Label field "Progressing" Then Set the status to “In progress” .
2. Change the status of the issue to Done.
Once the issue is marked Done, the Progressing field will be updated to "100% worked".
...
Need help?
💡 We're here for you! If you have questions or need to report a bug, visit our Help Center and raise a support ticket. Our team is ready to assist you!