Hi There, I want to create subtasks based on number of multi-select values selected. Is this possible using automation in Jira Cloud?
Thanks in Advance
Yes you can do this. In the simplest method, you'll just check the field's size using smart tags to access the fields information.
In the below example, I have a custom multi select field called symptom
@Julian Governale thanks for the answer.
How do I compare dynamic values?
ex- Custom field Application having values = [1,2,3,....,N] - In this case, automation should create "N" subtasks. Is this possible?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I suspect the answer is "yes", as you would use the list functions to determine the number of selections. Please see this documentation to help you get started:
https://support.atlassian.com/jira-software-cloud/docs/smart-values-lists/
Best regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To follow up, @Vedant Kulkarni_Trundl
There are no looping functions on a field value (or number of times) yet in automation. Here are the suggestions to add those features:
https://codebarrel.atlassian.net/browse/AUT-81
https://codebarrel.atlassian.net/browse/AUT-1312
Until then, if you have an upper limit on the number of sub-tasks which is less than about 20 then you could use If/Else clauses. There is a maximum of 64 components in a rule so I am guesstimating that you can probably add about 20 sub-tasks before you run out of space.
__Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bill Sheboy ,
Quick question - can you iterate through some custom field and based on that create sub-tasks? For example, I would need to create the following automation: when someone adds users to multi-user picker field, create that many sub-tasks and assign each sub-task to one user from that field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Probably, depending upon your Jira version (and thus your version of automation rule actions).
If you have Jira Cloud, you may use an Advanced Branch to iterate over the values of a field / smart value list, as described here: https://community.atlassian.com/t5/Automation-articles/Branching-over-smart-values-in-Jira-Automation/ba-p/1741935
The tricky part is in the details / rule timing: as you expect values to change over time, you probably want one-and-only-one subtask per person, correct?
If so add some logic / conditions inside of the branch to check if the subtask already exists to prevent duplication.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This works like a charm! Thanks @Bill Sheboy ! 🙌
Yeah... we'll need to consider all the details and how to manage the updates (if there will be any). I was just wondering if something like that would even be possible - we'll design everything afterward. And yes, we are talking about cloud site here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.