Is it possible to propagate field values from child to parent task?

When I create a sub-task of a task (i.e. story), I specify the relevant component for this particular sub-task.Is it possible to fill all components of all sub-task into the component field of the parent story automatically?


In other words a bottom up inheritance. 

2 answers

I think you could achieve this by using a custom script postfunction in the create issue transition of your workflow.

The script could do something like check:

  • if your created issue has a parent
  • get every subtask of this parent
  • for every subtask, check their components field value, cache if not already in your list
  • set the parents component value by adding the values you got in your list


If your in a new instance of jira, you could simplify this to:

  • if your created issue has a parent
  • set the parents component value by getting and adding the value(s) of your newly created issue


Hope this helps =) 

0 votes

You'll need some code in order to do that - a listener that can pick up issue-created and issue-updated on subtasks, read the component field and check the value of the parent, adding any components as required, and removing any that are removed from the sub-task after checking all the other subtasks don't have it.

Note that I've made some assumptions in the spec here - it boils down to "the parent component list should be all of the sub-tasks combined".  Although that does mean that the parent won't be able to have its own components really - you'd need to think through when it's right to delete if you want the parent to have its own.

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,080 views 13 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