Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Create subtasks based on number of multi-select values

Vedant Kulkarni_Trundl
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 23, 2020

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

2 answers

1 vote
Julian Governale
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 23, 2020

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

symptom_size_check.png

Vedant Kulkarni_Trundl
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 24, 2020

@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?

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 23, 2020

Hi @Vedant Kulkarni_Trundl 

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/automate-your-jira-cloud-processes-and-workflows/

https://support.atlassian.com/jira-software-cloud/docs/smart-values-lists/

 

Best regards,

Bill

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 28, 2020

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

Like Vedant Kulkarni_Trundl likes this
Tomislav Tobijas
Community Champion
October 26, 2023

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.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 26, 2023

Hi @Tomislav Tobijas 

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

Like Tomislav Tobijas likes this
Tomislav Tobijas
Community Champion
October 27, 2023

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.

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events