Link subtask to parent issue automatically with scriptrunner?



Has anyone successfully created a subtask on the Create transition and subsequently linked it to its parent issue automatically in the same transition with a script?


I'd really appreciate if you'd share how this can be done





1 answer

Hello Connor.

I believe this can be done with the SR Create Subtask post function.

Since it is a sub task, it needs to have a parent, so if you were to add this post-function in te onCreate transaction, it would create the subtask that you are looking for.

This is the dialog that you need to fill, and it can be accessed in the add postfunction dialog in the workflow transaction editor.

Screen Shot 2017-07-26 at 10.13.43.pngIf you have more questions do not hessitate to ask.





Thank you for the reply! I'm already able to create subtasks through this exact dialog- my question is how I can configure this dialog so that upon creation the subtask will be 'linked' to the parent issue - do you know how I could configure that?

Thanks a lot


Isn't that done automatically? When I create a subtask it links the parent on its own

That's a good point - a sub-task is always part of its parent and displays as such. The fact it is a sub-task means there is a link to the parent.

Creating an issue link as well is redundant (although if you looked at the code, you'd see an invisible "system" issue link is already there)

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 ...

2,811 views 11 18
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