Automatically create subtasks for multiple people

Ekaterina Georgieva November 3, 2021

Good afternoon!

In our company we use the JIRA application, in one of the created projects there is a large number of tasks and subtasks that will grow as we work.
To facilitate the work and reduce the time to create subtasks, we began to create them using automation.
This helped a lot, but subtasks are created only for one person using this automation.
Tell me, please, is it possible to make it so that when filling out a multi-user field, its own subtask is created for each of the different users?
That is, so that when creating subtasks using automation, is it possible to create subtask data for two or more users?

Thank you in advance!

2 answers

1 accepted

1 vote
Answer accepted
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.
November 4, 2021

Hi @Ekaterina Georgieva -- Welcome to the Atlassian Community!

For a question like this, please consider posting images of your automation rule and the audit log.  That will provide context for the community to offer ideas.  Thanks!

Given what you have described, I believe you could either use advanced branching or individually pull the values out of the multi-user field using list functions to assign to the new subtasks.

Kind regards,
Bill

Ekaterina Georgieva November 7, 2021

Good afternoon, Bill Sheboy!

Thank you very much! It worked

Like Bill Sheboy likes this
Rohit Kumar December 8, 2022

@Ekaterina Georgieva  Could you share which option worked ? I want to create task for multiple users on sprint creation. Right now I am able to create a task on sprint creation but want that same task to be assigned to 10 users.

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 8, 2022

Hi @Rohit Kumar -- Welcome to the Atlassian Community!

Do you mean you want 10 new tasks, one each assigned to a different user?

If so, what is the source of the list of users?  Is it a multi-select user field, as with the original question in this thread?

Kind regards,
Bill

Rohit Kumar December 8, 2022

Hi @Bill Sheboy  I was thinking to have the list of users comma separated in parent jira as a comment.  This can be changed as well based on feasibility. 
Also I came across using Advanced Branching as you shared above, but I don't see the 'Advanced Branching' feature for the Jira version we are using. 
So wondering if there's another way to do the same.

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 8, 2022

You are probably on Server/Data Center version, correct?

If so, the last post from the Atlassian team on this was in August 2021, and still no answer on adding advanced branches to that version for automation rules: https://community.atlassian.com/t5/Automation-articles/Branching-over-smart-values-in-Jira-Automation/bc-p/1769867#M476

The other work-around I was thinking about is using the REST API's bulk issue create to construct the JSON array in the rule and use an iterator to get the users from your field.  I am not using server so I cannot try this, and I wonder if using the iterator will prevent creating well-formed JSON.

If you want to try it, here are a couple of references on the specific method to call:

https://docs.atlassian.com/software/jira/docs/api/REST/8.7.1/#api/2/issue-createIssues

https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples/

Like Rohit Kumar likes this
Rohit Kumar December 9, 2022

Thanks for the input, let me take a look.

Like Bill Sheboy likes this
Maycon de Souza Leal August 25, 2023

@Bill Sheboy Hi,

I'm trying to set up this automation as you instructed @Ekaterina Georgieva , but I'm not succeeding.

Could you set up an example please?

I want to create sub-tasks according to the user number of a custom field multi-user picker. And after creating the sub-tasks, add each user as assign.

 

Im using cloud version of Jira.


Thanks.

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.
August 25, 2023

Hi @Maycon de Souza Leal -- Welcome to the Atlassian Community!

First thing, please consider creating a new question for something like this.  Otherwise only the people following the older thread will see it.  You can also link back to earlier posts for context.  Thanks!

Do you have a rule started?  If so, please post images of your complete rule, showing the details of the actions / conditions / branches, and of the audit log details showing the rule execution.  Those will provide context to help with suggestions.

If you have not started your rule, one important thing for this scenario is the use of iterators and advanced branches.  (Please note advanced branches are only available for Jira Cloud.)  To do that, the source for the branch would be the selected users in your field, such as this:

{{issue.yourUserField.accountId}}

That will provide the list of users to drive the branch, and then those values can be used to assign the created subtasks.

Kind regards,
Bill

Maycon de Souza Leal August 25, 2023

@Bill Sheboy Hi,

I haven't created my automation yet.

I created a new post: https://community.atlassian.com/t5/Jira-questions/Automatically-create-subtasks-for-multiple-people/qaq-p/2460309#M589743

If you can help me there, I'd appreciate it.

Thanks.

0 votes
Rachit Singhal
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.
November 3, 2021

Hi Ekaterina Georgieva,

 

It sounds like the script that is created for automation having user id of a specific user. Please try changing it to current user.

Suggest an answer

Log in or Sign up to answer