Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

How to get Parent issuekey from its subtasks in jira cloud

i am using jira software cloud instance and also having scriptrunner installed. i want to get parent issue key from its subtask on one of the transition using scriptrunner.

or can i copy one custom field value from subtask to its parent issue type field?

2 answers

Hi @chinmay konkar 

We have an example here where it shows how to sum up values from fields on a subtask and store them in the parent. You can use this example as a guide/reference to help create the script that you require.

I hope this helps.

Thank you

Kind Regards


Thanks a lottt ! @Kate Kabir 
It worked for me.

Like Kate Kabir likes this

Hello in a transition you can get the key (or any other field from the parent of a subtask)


public String getParentKey(issue){

def parent = issue['parent'] as Map


Such a function returns the parent key

If what you need is to copy info from the subtask to the parent you have to obtain the values of the fields, build a map and perform an update of the parent

public static void updateIssue(issueKey, updateMap){

def result = put("/rest/api/2/issue/${issueKey}")
.queryString("overrideScreenSecurity", Boolean.TRUE)
.header("Content-Type", "application/json")

if(result.status != 204)
throw new Exception(result.body)


@Juan Manuel Ibarra  thank you so much for your reply !

Suggest an answer

Log in or Sign up to answer
Community showcase

The benefits of using Jira in different departments

Jira is a great tool to use across different departments. Forget that paperwork – switch to Jira and get that tasks done smoothly. Marketing Jira allows for a complete digital transformation of you...

129 views 0 7
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