-
Type:
Bug
-
Resolution: Won't Do
-
Priority:
Low
-
Component/s: Action - Issue Actions
-
Severity 3 - Minor
-
Jira Software
Issue Summary
When using an Automation for Jira rule with an advanced branch to add labels one by one, only the final label from the branch is retained. Each iteration appears to overwrite the previous labels instead of accumulating them. Even using a re-fetch work items action or adding delays does not resolve the issue.
Steps to Reproduce
- Create a multi-select custom field and configure several options (e.g. Option#1, Option#2, Option#3).
- Create or open an issue and select multiple values in this multi-select field.
- Create an Automation rule similar to the following:
- Trigger: Issue created (or updated).
- Action: Create a smart variable that stores all values from the multi-select field.
- Advanced branch: Branch over that variable so that each iteration represents one selected option.
- Inside the branch, add an Edit issue action that adds a label based on the current option (intending to add labels one by one from the branch).
- Publish and run the rule on an issue matching the conditions.
- Check the Labels field after the rule finishes.
Loom video is here: https://www.loom.com/share/7bdbda64461545c8b6a3382c7eeea9d0
Expected Results
All labels derived from the values in the multi-select field are present on the issue after the rule completes. Each iteration of the advanced branch adds a label and preserves labels added in previous iterations.
Actual Results
Only the last label processed in the advanced branch is present on the issue. Labels added in earlier iterations are not retained and appear to be overwritten by the final iteration.
Additional observations:
- The rule runs without error and reports success.
- Using a Re-fetch work items / re-fetch action does not change the behavior.
- Adding delays within or after the branch does not help.
- It appears the label updates within the branch do not see or preserve the labels set in previous iterations.
Workaround
Currently there is a partial workaround:
- Do not use branching to add labels one by one.
- Instead, set all labels at once from the multi-select field using a single smart value expression, for example:
{{customfield_1234.split(",")}}This treats the comma-separated values as a list and applies them in one go, avoiding the problem where only the last label from a branch is kept.
However, this workaround has significant limitations:
- It is hard to manage more complex scenarios, such as:
- Adding extra text/prefix/suffix to each option.
- Cleaning or transforming individual values before turning them into labels.
- Since everything must be handled in a single expression without per-item branching, complex logic becomes difficult or impractical.
A more robust fix is needed so that adding labels iteratively within a branch works as expected.