do not inherit components when creating subtasks

Michael Aglas June 12, 2016

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

0 votes
Answer accepted
Michael Aglas June 14, 2016

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

IMAGE$34959A5F4F350BDB.jpg

0 votes
Mahesh S
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 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.

Michael Aglas June 12, 2016

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

Mahesh S
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 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: https://answers.atlassian.com/questions/260020

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.

Michael Aglas June 13, 2016

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
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 14, 2016

so, you found a workaround? smile 

Michael Aglas June 14, 2016

it's not nice, but yes

Mahesh S
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 14, 2016

May I know how you have done this?

Michael Aglas June 14, 2016

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
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 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