Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

Dynamically create subtasks based on select list field

I have a custom field single check list and if a value is selected, I need to create a subtask based on the value.  The subtask needs to have the summary based on the value in the field and the assignee should be based on the value and an email should be sent to a distribution list (not a user) associated to the selection in the field.

Additionally, if the value Global is selected from the custom field mentioned above, then ALL entries from the select list should be used to create subtasks per process above.

The Global option should not have a subtask, so that selection is ignored in regard to creating a subtask, it is used to denote to JIRA that all the other entries in the select list should be used to create a subtask

JIRA needs to read the selected value and if it is Global, it will then needs to get a list of ALL values that are possible in the select list and then create a subtask for each value in the single select list.  Again, it would not create a subtask for Global, just all the other possible values.

2 answers

0 votes
John Funk Community Leader Nov 01, 2019

Hi Matthew,

You will need an add-on for that from the Marketplace Apps. Either Automation for Jira or ScriptRunner should do that nicely. 

I have scriptrunner, but do not see an option for this.  I think it would require groovy scripting?? 

Scriptrunner can create a subtask, but it is predefined.

I installed Automation plugin and it does not have this feature.  For creating a subtask, it wants the Summary details hardcoded.  I need the summary details to be dynamic based on the value selected from the LOB single select field or ALL possible values if Global is selected in the LOB field (but excluding Global).

I am simply not familiar with writing groovy and would request help from the community. 

1. Need to read the value of LOB single select field

2. If value is anything other than Global, create a subtask for that value

3. If the value is Global, then create a subtask for ALL possible values currently in the LOB single select drop down.

John Funk Community Leader Nov 14, 2019

Hey Matthew - I would try contacting Automation for Jira or ScriptRunner support directly to see if they can help or if the functionality even exists.  Sorry to not be more help. 

0 votes
Leonard Chew Community Leader Nov 14, 2019

Hi Matthew 

Yes, with Scriptrunner it needs some scripting.

I'd do it like this:

  1. Create a custom Listener "on update" event (groovy script)
  2. The listener checks the the newly saved value of the dropdown
  3. based on the value it creates the subtasks.

I dont have the code at hand, but here are some hints:

get the dropdown value

create sub-task

-> the last comment by Elifcan Cakmak seems to be the best for you.

Suggest an answer

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

How to create Jira issus from Excel file?

When to use CSV importer When managing your processes in Jira, there are many occasions where you need to create a lot of tasks. Creating them one by one will cost you a lot of time and effort and i...

4,375 views 22 32
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