You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I have a custom Field of type "Checkboxes". There I can select multiple Items from a list (predesigned steps that need to be done. E.g. Step1, Step2, Step3). When I add a new item to the checkbox, I would like to have an automation rule that automatically adds a Subtask for every selected step with the description "Conduct Step1".
I created an automation Rule that checks the custom Filed for values to be added.
With {{fieldChange.toString}} I get a String of all currently selected boxes.
Now I have to problems:
* How to seperate this list and create multiple subtasks --> currently it creates one subtask with the whole list a s a string
* How to check that the subtask does not already exist and a duplicate is created
Hi @Johannes Mayr -- Welcome to the Atlassian Community!
You could use an Advanced Branch, over the selected values of your checkbox field, and add a subtask for each one.
Please look here to learn about using Advanced Branches: https://community.atlassian.com/t5/Automation-articles/Branching-over-smart-values-in-Jira-Automation/ba-p/1741935
Also note that this type of branch executes in parallel for performance reasons, and so there is no guarantee of the order your subtasks will be created.
Regarding your question about preventing duplicates...That is a bit more complicated.
You could use Lookup Issues to first gather the current subtasks. And then inside of the branch, use a condition to confirm the subtask does not exist before creating it. Or you could just check the {{triggerIssue.subtasks.summary}} values, as that is already loaded.
And so an outline of your rule could be...
Kind regards,
Bill
Hi Bill,
thanks for your reply. I currently try to implement a simplified version that does not yet check for dublicates, but I'm struggling with the advanced branching function.
As suggested by the "When: Value changes for" block I used {{fieldChange.toString}} to get a list of the changed values of the checkbox.
Then I assign Summary field with {{WorkProduct}} in the "Then: Create a new" block.
This works so far, but I do only get one new subtask that has the whole list of selected items in the summary. So the "loop" does not work and is only executed once.
How to manage that my list is correctly iterated in the list?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The {{fieldChange.toString}} smart value will just be text, and not a list of values.
Your two options are to use the split() function on any commas or to specifically use one of these smart values:
{{addedFieldChange.valueIds}} or {{addedFieldChange.values}}
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--fieldChange--
The specifics will depend upon how you are trying to use those in the create issue action.
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.