customfield_10193
) by commas using {{issue.customfield_10193.split(",")}}
.customfield_10164
), which is configured as a label-type field.Island,TEST,Test_Gilad,TestIt
TEST
and TestIt
are added, while Island
and Test_Gilad
are ignored.Here’s what I’ve done so far:Hi @Bar Azgad -- Welcome to the Atlassian Community!
Automation rule branches which could be on more-than-one-thing are executed in parallel and asynchronously. There is no guaranteed order of processing or even when the branch will complete, up until the last step of the entire rule.
What this means for the rule you show is the updates are colliding / walking over each other during the update processing, leading to unpredictable results.
The solution for your scenario is to add all of the labels with a single update using dynamically created JSON and a list iterator:
Your branch logic seems to only be checking if the new label is not present before attempting the edit. If that is ignored, the values could be updated even if they exist with this:
{
"update": {
"labels": [
{{#issue.customfield_10193.split(",")}}
{ "add": "{{.}}" } {{^last}},{{/}}
{{/}}
]
}
}
If you only want to perform the edit if the values are not currently present as labels, that would require using a dynamic regular expression and the removeAll() function to first eliminate any existing values.
Kind regards,
Bill
Hi Bill,
Thank you for the detailed explanation and resources! Do you have additional recommendations or resources to learn more about Jira automation capabilities, especially for creating advanced rules like this one?
Kind regards,
Bar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Awesome; I am glad to learn that helped!
For learning more about automation rules, I recommend experimenting, reading, and collaborating...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.