How to auto create sub tasks after an issue with custom fields selected.

Hi there.

I will have a workflow that I need help understanding.

I will have issues created where there is a custom field that has 5 selectable options. These determine which teams work on the fix. What I need is for the issue to generate individual sub tasks for those selected options.

I would also need these sub-tasks to be individually assignable to different individuals (they will be set to assignable user status).

I would then want it to so that once all Sub-Tasks are completed and closed, the original master issue then closes too.

I am very new to writing scripts and such, so if I could get a detailed step by step, I would be forever in your debt. Thank you for taking the time to read this!

6 answers

1 accepted

2 votes
Accepted answer


Let us start with closing the parent issue when the subtask is closed.

1. Go to the workflow being used by your sub-task.

2. Click on the transition you would like to run this script (to close parent task if all subtasks are closed)

3. Then select Post-functions and choose to Add a new post-function

4. Select "Script post-function" and click "Next"

5. Select "Transition parent when all sub-tasks are closed"

6. Choose the status for the parent task and a resolution.

Let me know once you get this far.

I have completed the steps you have mentioned. Thank you. What's your next advice?

Would you recommend that I have a separate workflow for Sub-Tasks? Or is sharing one across all issues/tasks and sub-tasks acceptable?

I would have subtasks follow a separate workflow as subtasks workflows in my experience are usually simpler than the parent task.

Please vote up the above answer if it helped you.

Yes, for that I need more information to help you.

What are the options in your multi-select list? What values do you want to transfer to the sub-task? Can you give me as much info as possible?

OK, well then I'll make a new one for sure. For now though, just to learn the process I'll stick to what I have. I've upvoted the answer. The only thing I need to do now is learn how to create autogenerated subtasks, depending upon which boxes in my custom field are ticked in the initial issue report.

OK, my selections in the field are language names;






I would need a sub-task per language that is ticked to be made within the issue. So if only 3 of them are ticked, only 3 sub-tasks appear etc. All values can transfer. If it's possible to have the Sub-Task name generate the original ID number of the parent issue into it's summary, then that would be even better, but it's not essential.

Is this enough info, or would you need anything else?

Hi Chris,

Most of your requirements are covered by the script runner plugin.

Take a look at it and let me know if you require additional info

Hi, I accidentally tagged it as Ondemand before, but it's not. My apologies.

I have installed the plugin, but I'm very new to this, and I'm not strong at scripts.

After I have downloaded it, what would I need to do to get these stages in place?

Thank you for your help, it is very appreciated!

So you want to create a subtask based on the multiple options selected in a multi-select field in a post-function?

What are the options on the multi-select field and what sub-tasks would you be creating? This question is already filled with comments. It will be easier if you can create a new question with more detailed information as to what you are trying to achieve.

Hi Bhushan,

i have similar requirement, i have a multi select Field, where user can choose/tick one or more options from multi select field, now i need to create sub tasks for each option selected.

Could you please help me with the script?

Thanks for ur quick reply Bhushan, as you mentioned i have created a new question. Could you please help?

Hi Chris,

You might want to write your own plugin for this requirement. Heading back home now but I might have a plugin I have written that might help you get started of. Can mail you the project if you give me your email id. You can expect a response by tomorrow as I am done for the day.



Thanks for your assistance. It seems as though the parent issue isn't closing when I close the sub-tasks, but I'm sure that's an error on my side that I will look into.

Hi Bhusan. Did you have that plugin available at all?


Hey Chris, will send it to you in a few hours.

Hi Bhushan - could you please send me this plugin as well?

Hi Bhusan, I accidentally tagged this as ondemand. It's the installed version I'm working with.


Not sure if your request being resolved, if not go this link:'s create on transaction for jira plugin meet exactly your needs


Suggest an answer

Log in or Sign up to answer
Community showcase
Published Wednesday in Jira

Make your Atlassian Cloud products more secure: our NEW admin security guide

Hey admins! I’m Dave, Principal Product Manager here at Atlassian working on our cloud platform and security products. Cloud security is a moving target. As you adopt more products, employees consta...

135 views 0 6
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you