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

Auto populated parent issue id to description field of Sub:task


Autopopulate the parent issue ID to  Sub:Task Description field during the creation of the Sub:Task  issue type and the auto poulated description should be "See parent ticket xxx-1234" and parent id should have a hyperlink. Please help me how to achieve this.

At below i'm attaching the screen shot where i entered manually.

parent id.png

Note- we are using scriptrunner in our organization.




2 answers

1 accepted

2 votes
Answer accepted

Hi @siva  Apply Custom script post-function on subtask workflow to display parent issue key in Subtask description field.


import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.UpdateIssueRequest

//def baseUrl = ComponentAccessor.getApplicationProperties().getString(APKeys.JIRA_BASEURL)

issue.setDescription("${issue?.getParentObject()?.getKey()} is the parent issue key")

 Hope it works for you!



@Vikrant Yadav 

Thanks for the reply and the above mension script works thank you very much for your help.



Like Vikrant Yadav likes this

@siva Cool! Glad to hear it works for you!

Thank You


0 votes

Hi @siva

You will need to use a post function that overwrites the description with the parent's key. 

Here are the details:


Hi @Fabian Lim 

Thanks for the early reply gone throw the script but actually i'm new to the scriptrunner so, i'm bit confused can you please paste the modified script code that shows  parent issue key ID  in description field in Sub:Task 

Example : See parent ticket Siva-1234     here Siva-1234 is parent issue key ID 

Thanks for the help truely appreciated 




Suggest an answer

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

👋 Looking for 15-20 volunteers to test Atlassian training content

Hi everyone! Are you interested in beta testing Atlassian University’s newest (unreleased!) training course? We’re looking for 15-20 volunteers to test our newest training course, Basic reporting...

871 views 25 28
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