It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to create sub tasks automatically on parent issue creation?

SUNIL SABALE Nov 19, 2015

Hello, my requirement is that I want to create sub tasks automatically and assign automatically to the selected users in multi user selection. So how can I achieve this. Actually my requirement is I want to divide the expenditure amount among users. So I took the "Paid Amount" text field and "Shared Among" multi user selection field. So suppose 600 is entered  in  "Paid Amount" so creating on parent issue for expenditure of 600 and 3 sub tasks for collecting 200 from 3 respective users.

So, how can I achieve this. Thank you in advance 

4 answers

1 accepted

1 vote
Answer accepted
Nic Brough [Adaptavist] Community Leader Nov 19, 2015

There are a few add-ons that will provide you with a "create sub-task on issue create" function, but it sounds to me like you probably need one of the more flexible ones as you have some logic to do - not just a fixed "create X subtask(s)".  I'd use the script-runner to do this.

2 votes
Andreas Knecht Community Leader Nov 21, 2016

There's now a very easy to automatically create sub-tasks with Automation for JIRA!

You can easily create sub-tasks with our 'create sub-tasks' action:

create-sub-tasks.png

For a full list of available conditions and actions see: http://codebarrel.io/available-rule-components/

We also have a number of conditions you could use to check the value of the paid amount field.

1 vote
Daniel Bajrak Nov 20, 2015

Hi,

have you tried to use Issue Templates? There is option to create subtask on create and on selected trasition:

https://intenso.atlassian.net/wiki/display/IT/Create+template's+subtask

I hope I've helped you.

Best Regards

How to create multiple issues - advanced example shows an example that will create multiple issues dependent on the selections for a multiple selection field including support to prevent duplicate issue creation. This uses the Create Issue post function from Create on Transition for JIRA.

cedg82@hotmail.com Sep 11, 2018

Hello Bob,

In the Create Subtask post function the option "Entry parent" is by default %parent_key%, I have two post functions to create a couple subtasks using the Create multiple issues" option but in two different parents.

My question is, can I use a different variable in the "Entry parent" field to indicate the parent where the subtasks will be created in each postfunction?

Please let me know if this make sense for you, your help will be very appreciated. 

Bob Swift Sep 13, 2018

Yes, you can specify a specific issue key or any variable that represents an issue key that is valid to be the parent of the subtask. For instance, it could be the result variable from a JQL query.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Jira Software

Early Access: If you use Jenkins and Jira Software Cloud, you need to read this!

The Jira Software Cloud Team has been busy working on a simple, secure, and reliable way to integrate your build and deployment information from Jenkins with Jira Software Cloud. This means you don’t...

170 views 0 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you