do not inherit components when creating subtasks

This question is in reference to Atlassian Documentation: Configuring sub-tasks

Hello we are using JIRA 6.3.7 with according JIRA Agile Plugin installation. I recognized that when creating a subtask of an issue the component field is inherited from parent, which is undesired behaviour. I guess this is implemented in JIRA Agile, when switching plugin off everything works as expected, while switched on the component field appears with same components as parent issue. How to remove this behaviour? Is there any setting to do so? Or do I really need to write a script to remove components in case it was left blank on creation?

2 answers

1 accepted

This widget could not be displayed.

ok with a postscript I can prevent such behaviour, but it is so weird behaviour... the agile plugin allows to copy values from parent to child, why implementing such behaviour hard coded - make s no sense


This widget could not be displayed.
Mahesh S Community Champion Jun 12, 2016

This is not a default behaviour in JIRA. Please check the post function in the create step of the child issue's workflow. I believe, a post function will be present to inherit the component value from the parent. Kindly delete it if available.

There is not post-function for it existing in the workflow. As I wrote: it seems to be JIRA Agile plugin.

Mahesh S Community Champion Jun 12, 2016

Okay, agreed! The JIRA agile is copying the basic system fields (such as Component(s), Priority, FixVersions,etc..) from it's parent task automatically. Its mentioned here:

Luckily, I believe the fact is that, JIRA is copying these fields only if it is left empty. Please confirm this.

If it is true, we can add a post function to clear these fields if not required.

this is true... but I want this field to be optionally be filled by the user. So it can be left empty at the beginning and the function group, processing this subtasks, will enter affected components, which are collected at main issue... I don't need components be inherited, since it will confuse the users.

Mahesh S Community Champion Jun 14, 2016

so, you found a workaround? smile 

it's not nice, but yes

Mahesh S Community Champion Jun 14, 2016

May I know how you have done this?

I used groovy script executed in subtask postfunction of create transition:

this checks if the components are empty, if yes it explicitly sets component field to be empty

in any other case I don't touch component field, so it will take already entered components on create screen

this does the trick

I first checked for components equal to parent, but that doesn't work out

Mahesh S Community Champion Jun 14, 2016

That should be appreciated. I believe scripted field along with validation is the only solution.

Suggest an answer

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

New 5k User Limit and Other Cloud Updates

Hi all! Lauren here from the Enterprise Cloud marketing team.  I have some exciting Cloud updates from #AtlassianSummit that I wanted to share. We want everyone in your organization to be ab...

119 views 0 3
Read article

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