create child ticket

i want configure following functionality.

I want to create child ticket just after create parent ticket rather create separately and link.

 

how can configure this functionality on my instance.

 

 

 

 

2 answers

Hi Gayan,

You can do this using the Power Scripts add-on.

There is a video tutorial walking you through in detail here.

Here is the code:

string issue_project = project;
string issue_parent_key = key;
string issue_type = "Sub-Task";
string issue_summary = "New subtask for " + key;
string issue_priority = "Minor";
string issue_description = "";
string[] issue_components;
date issue_dueDate = currentDate() + "30d";
interval issue_estimate = "1h 30m";
string issue_security_level;
string[] issue_fields_mapping;

if(customfield_14822 == "Yes") {

string subTaskKey = createIssue(project, issue_parent_key, issue_type, issue_summary, issue_priority, issue_description, issue_components, issue_dueDate, issue_estimate, issue_security_level, issue_fields_mapping);

linkIssue(subTaskKey, issue_parent_key, "Relates");

0 vote

You'd need to hack the create functionality, dealing with the cases where people do not want to create a sub-task straight away as well.

Could you use a "create sub task" post-function on the create transition to generate one automatically?

Is there any possibilities to control child ticket create (lest say if user checked particular check box)  

You'll need code that can pick up the data on the parent issue and decide whether to create sub-tasks or not.

Do you have any of the scripting add-ons? 

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,296 views 14 20
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot