When you create a sub-task can you automatically inherit certain fields from the parent?

DeniseThompson397 January 13, 2013

Hi,

We want to force the population of a "product code" field when a sub-task is created. For example if an issue is created with a product code of PC045 then we want any sub-task created to be populated by default (would be good if it could still be changed later) with PC045. This field is selected via a drop-down in the parent issue.

6 answers

1 accepted

12 votes
Answer accepted
MJ
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 13, 2013

Yes, you can have fields inherit the value of the parents field.
In the create issue transition you can set the "Set Field Value from Parent" option in the post-functions. You can either do this in the default workflow you are using for the project, or make a separate workflow for sub-tasks. When only using this post-function, changing the value of the field in either the parent or sub-task will have no influence of the others value.

benpeter June 23, 2014

Mick, is this supposed to work in on-demand? I can't seem to find an according post function, nor does the Update Field function offer me to set the value from the parent.

MJ
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 24, 2014

Hi Ben, I checked a test instance of OnDemand. The function becomes available after the 'JIRA Misc Workflow Extensions' have been enabled. As far as I could see, normal adminitrator privileges should allow you to enable this add-on through the "Manage Add-ons" section of your instance.

benpeter June 25, 2014

Thanks, Mick! Works perfectly :)

Aaron Pickrell March 20, 2015

Hi Mick, I am unable to get this to work. I too am an OnDemand customer and have verified that the JIRA Misc Workflow Extensions add-on is enabled. I can get this post-function to work on any other transition, but for some reason it does not work on the Create Issue transition. Here are my post functions for the Create Issue transition: 1. Creates the issue originally. 2. Fire a Issue Created event that can be processed by the listeners. 3. The value(s) of field Due Date will be set from the issue's parent (replacing existing values). 4. The value(s) of field Environment will be set from the issue's parent (replacing existing values). Any ideas?

Gunther De Cock May 21, 2015

JIRA Misc Workflow Extensions is not "Free" For me it's very strange that you have to pay extra for a functionality that seems very 'basic' to me

Like # people like this
Anton Haglund July 17, 2015

Aaron, I don't know if you have solved your problem yet - but try to put the post-function for Due Date on top. I had the same problem when I tried to set a datepicker and having it as the first post-function solved the problem. /Anton

Scott Sullivan July 29, 2015

++ on the not-free concern. I'm looking for a way to copy/inherit parent's field values to sub-task that is not $,$$$ on top of our subscription.

Like mike likes this
John Jung January 11, 2016

Anton, thanks for your comment - pushing the values of the field to the top is what also solved it for me.

Afslag2 August 3, 2016

Wow, $500+ for a basic feature like this. GG

Like # people like this
Jerome Bleichenbacher August 31, 2017

Is this basic-feature available for free in Jira Software by now? I'm not willing to pay for this small extra, either.

Like mike likes this
Judah October 24, 2018

Does anyone have any idea how to write this as a groovy script that fires on the listener event "issue created"? 

Like Steffen Neumann likes this
4 votes
Naren
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.
January 13, 2013

You may try using the Copy to Subtask Plugin to automatically populate the customfield's value from parent issue to it's subtask.

DeniseThompson397 January 13, 2013

Thank you!

Naren
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.
January 13, 2013

Well, let us know if it helps, also you may mark either of the above answer correct if it helped you! :-)

Renjith Pillai
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.
January 13, 2013
In ondemand?
DeniseThompson397 January 13, 2013

I clicked on the tick but it didn't seem to do anything

Naren
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.
January 13, 2013

Hi Renjith,

Thanks for pointing out. As I am not quite familiar with JIRA OnDemand, I learnt that we can't install plugins on JIRA OnDemand. Sorry for not referrring the tags of the above question!. So can we expect change in the above policy for JIRA OnDemand in future?

DeniseThompson397 January 13, 2013

I'm not sure whether we can install plugins on JIRA OnDemand either, I was going to check that.

Renjith Pillai
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.
January 13, 2013
Not possible at the moment, except for the already installed ones. Till plugins 3 becomes a reality.
Kathleen Yomo November 17, 2015

Hi can i check if this solution would be able to inherit the attachments from the parent tasks as well ?

2 votes
Renjith Pillai
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.
January 13, 2013
Yes, misc workflow extensions plugin has a post function "set value from parent" during sub task operations. But setting it from parent to child during later updates is not possible in ondemand
alan lippa December 4, 2013

hi Renjith,

has this changed with the current ondemand version - this is exactly what our Dev is asking for.....

thank you!

Jenny Diaz August 21, 2015

Can someone point me to print screen, as this works, and as reflected in Subtask change as probe and had no results.

Divya Yathagiri Venkata March 20, 2018

Hi Renjith,

I am trying to have the sub-task created with the same status as parent. I tried both of the below but the sub-task is still being created with 'New' status when I create one.

I tried to add the post-function 'Copy field value from parent issue (JMWE add-on)' [Set the value(s) of a field to the value of the same field in the parent issue] but this does not have Status field.

I have also tried to add a post function 'Copy Value From Other Field' to copy the status field from parent to sub-task which didn't work either.

How do I achieve this?

Thanks,

Divya

Anthony Hall May 4, 2018

We're also looking to see how this is possible in On Demand.

Can somebody from Atlassian chime in on this?

0 votes
Stanislav Budaev December 5, 2019

I solved it this way (jira v7.13.5 wit JWT plugin):

  1. go to edit issue workflow
  2. select Create transition
  3. select Post functions
  4. select "Copy a parsed text to a field"
  5. select a field to change
  6. select Advanced mode
  7.  type something like this "toString(fieldValue(%{12902}, epic()))" which is "A value of field number 12902 from an parent epic"
  8. save
0 votes
Jyotirmay October 23, 2018

when i am creating a first subtask from parent issue it copies the values from one field to another but if i am creating second subtask from the same issue it copies the value of the same field from subtask not from parent issue from which i have created this second subtask.I am using post function Copy Value From Other Field.Please help

0 votes
andreas
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.
November 21, 2016

There's now a very easy to configure way to keep fields of parents and sub-tasks in sync using Automation for JIRA!

You can easily modify related issues (such as parents, stories, sub-tasks, epics, linked issues and even JQL) using our related issues action and condition:

(this example transitions sub-tasks, but you could easily change this to edit the sub-tasks with a field value from the parent)

For more details see https://blog.codebarrel.io/synchronize-parent-and-sub-task-issues-with-automation-for-jira-bdcca6c9d453

Suggest an answer

Log in or Sign up to answer