create child ticket

gayan ganepola September 25, 2017

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.

 

 

 

 

5 answers

1 accepted

1 vote
Answer accepted
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 18, 2020

Hello,

Just a quick update about this question in order to better clarify it:

You can easily create a sub-task from an existing parent issue by navigating to parent issue > click more actions (•••) > Create Sub-task in Jira server, or Clicking in Create subtask () at Jira Cloud.

When it comes to Automation:

Jira Cloud - You can automatically create sub-tasks when creating its parent by using the inbuilt Automation functionality (Project settings > Automation). It's easy and very intuitive:

Jira automation 

Jira Server - You will need a third-party plugin to achieve this. Here are some options:

Automation for Jira - Server 

ScriptRunner for Jira 

4 votes
Ethan Foulkes October 8, 2017

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");

1 vote
Garth Hume October 5, 2021

This is not an answer, but an observation.  It is unexplainable that this functionality is not available out of the box.  Why would you want to run a script to create child issues? And I am not talking about subtasks.  I think Atlassian need to fix this bug, not have their clients run around putting in workarounds for such basic functionality requirements.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 5, 2021

Generally you don't want to create sub-tasks automatically in the processes Jira is mainly aimed at supporting.  That's why there's nothing built-in.  It's not "basic functionality", it's "good to have when we're using Jira for some stuff that it's not really built for"

Although Automation was one of the apps that provided the function and is now part of Jira Cloud, so Atlassian have put it in.

Garth Hume October 13, 2021

How is creating a child issue not basic functionality?

Like AHMAD_ Romina likes this
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 13, 2021

Sorry, I was not as clear as I should have been there.

Creating child issues automatically is not "basic functionality".  

Garth Hume October 13, 2021

I agree, but you should be able to manually create child issues of your choice based on your configured hierarchy?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 13, 2021

Yes, and you can.

Garth Hume October 13, 2021

Only in the same project?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 13, 2021

Depends on what type of "child" issue you are thinking of.

  • A sub-task (child) is part of an issue, the project is pretty much irrelevant for a sub-task, as it gets that from the issue of which it is a part.  "Only in same project" does not make sense - to have a sub-task in a different project would be like saying "I'm doing a park run in London next week, but my left leg is in Arizona"   (There's a bad analogy behind that which is happening in another conversation, but the point stands - it's nonsense to have a part of an issue unrelated to the issue)
  • For a "child" of an Epic, there's no restriction on project - the Epic can be in any project, and you can include any issue from any project within that Epic
Garth Hume October 13, 2021

I am aware that you can link via the epic/parent link from anywhere as long as it follows your setup hierarchy.  What I am saying that from a parent you cannot create a child that you want in a different project from the parent.  

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 14, 2021

Yes you can.  Sorry, but I don't think I understand what you're asking now.

Eli Szus June 20, 2022

Going to have to agree with @Garth Hume's original comment here. 

This seems like it should be pretty core to just move a ticket between being a child and a parent. Basically every competing tool does this fluidly.

This was also clearly intended in the design as there is an option in each issue called "Add parent". When you click this the modal title doesn't say "Add parent" - it says "Add epic". Then all the language in the modal is about parents. Clearly, the original design was meant to allow this functionality and someone messed up.

Screen Shot 2022-06-20 at 10.18.57 AM.pngScreen Shot 2022-06-20 at 10.18.40 AM.png

0 votes
Paul Scheiner January 21, 2020

The answer seems to be  that it is not easy to do.  Would I be better off creating a feature and then the children would fall under the feature?   Still does not address the possible need for grandchildren. 

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 25, 2017

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?

gayan ganepola September 25, 2017

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

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 26, 2017

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? 

Paul Scheiner January 21, 2020

To create a child I must hack the create functionality?!? LAME!

Like Paul Russell likes this
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 22, 2020

No, just click "create sub-task" in the new issue.  Or automate it. 

Most people do not want to have to create a sub-task.

Suggest an answer

Log in or Sign up to answer