Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Change a field in Subtask when moving to parent

Friedemann Wagner July 16, 2021

Hi all, 

 

i have a question on rule automation. 

Our teams works a lot with the lables and also subtasks. Whenever we add a task to a parent we would like to have the lable of the child to be filled with the lable of the parent. 

As within the Rule automation i could only find one parent I used it but the rule itself does not work. 

Below you can see my current rule which does not work...

Does anyone here has a similar issue / solution?

Thanks a lot

Friedemannimage.png

4 answers

1 accepted

0 votes
Answer accepted
Daniel Ebers
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.
July 19, 2021

Hi @Friedemann Wagner

am I getting it right that you want to create sub-task under a parent issue where automation should bring the labels of the parent to the sub-tasks?

If so I am wondering if the following rule would work for you (testing in my instance it did the job properly):

 

grafik.png

Because you named your rule "Label copy to child issue" I believed it would work for your scenario, however I am puzzled about the trigger "Value change for Parent Link" I saw recently quite often.

Probably you can check and confirm - happy to hear some feedback.

Regards,
Daniel

Friedemann Wagner July 19, 2021

Thanks a ton Daniel, 

i somehow have the same than you have and the report even states that it worked but it does actually nothing to the lables filed:

image.png

Thorsten Boll July 20, 2021

@Daniel Ebers , did you actually try this? I think, there is a timing issue when using the "Issue Created" trigger. At the time, the Rule is executed, the Sub-Task is not yet fully set-up and does not know about its "Parent", thus failing to retrieve the Labels from the Parent. Any other trigger works just fine, and Labels are properly copied from the Parent.

From what I gathered, there is just no way to define a trigger like "If Parent is set" for a sub-task.

Here's proof for my claim:

2021-07-20 14_47_44-Project automation - JIRA und 5 weitere Seiten - Thorsten @ MX – Microsoft​ Edge.png

Daniel Ebers
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.
July 21, 2021

@Thorsten Boll 

In my test I used a company-managed project and it worked out all fine, just re-checked the log, no timing issue or anything. In fact it copied over three labels - everything as expected.

I could imagine in a team-managed project it might not work that way, they are structured differently.

A timing issue, because you touched that, could be remedied by a "Re-Fetch" action - but you would have to test it, I cannot reproduce it here (as pointed above).

Like # people like this
Daniel Ebers
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.
July 21, 2021

@Friedemann Wagner

Could you please...

... confirm if it is a team-managed or company-managed project (you can find the information when you open the projects on the left bottom)

... show what you exactly have configured for "edit action"? Does it show like this?

grafik.png

Please spot the difference that is possible here. In a previous reply to @Lisa Grau it was visible you selected "Set value" >>"Copy from parent"
I'd like to ask you to use for a test "Copy from" >>"Parent Issue" (check the box in "Add to existing values").

Then please click "Save" - it should be then the absolutely identical rule compared with what I have in my Jira instance.

Thorsten Boll July 22, 2021

@Daniel Ebers , thanks for the reply. It's a team-managed project.

For company-managed project, we'd have went with the "post function" in the create issue transisition rather than using the new automation rules. ;-)

I tried all sorts of things, but it all comes down to the fact that the "issue created" trigger seem to trigger too early, so subsequents actions are not effective. Copying labels (or other data) works fine for any other trigger.

But, Re-fetch action does the trick though. Labels are now properly added to the Subtasks. Thanks! :)

2021-07-22 09_03_12-Settings - JIRA und 3 weitere Seiten - Thorsten @ MX – Microsoft​ Edge Beta.png

Friedemann Wagner July 22, 2021

thanks a ton @Daniel Ebers

the re-fetching indeed solved the problem! 

1 vote
Curt Holley
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 16, 2021

If you are talking about sub-tasks of Stories, then it is the Parent, not the parent link field (which is used for the hierarchy above a Jira Epic).

You can have labels from a parent copied into its children (sub-tasks) via a post function in the workflow itself.

sb.png

0 votes
Friedemann Wagner July 22, 2021

Thanks everyone for supporting us with the issue. We now solved it!

0 votes
Lisa Grau
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.
July 16, 2021

Hi Friedemann,

your automation should actually work, can you show me your settings in the edit issue action?

I recreated the automation like this (sorry for the german text, explanation below):

2021-07-16 14_40_58-Project automation - Jira.png

I used the same trigger and action as you did, selected "copy value from issue" and used the parent issue (= Übergeordneter Vorgang) as source.

It works just fine for me!

Friedemann Wagner July 16, 2021

Thanks so much for you reply. 

here is my edit screenimage.png

Friedemann Wagner July 16, 2021

is it required to see a field called "parent" within the subtask?

I couldnt find any filed like this in the configuration. All i can see is "change parent"

Lisa Grau
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.
July 16, 2021

Okay, that works, too.

In this case I'd suggest to set the trigger to Value changes for Parent Link for [all operations] and not restrict it to "edit issue".

The restriction will only change the label when the sub-task is edited, but (if I got you right) you want to change the label also when the sub-task is created.

Since editing and creating are two different operations, your automation rule will only trigger when the sub task is edited after creation, not during creation. That should explain why the rule doesn't even fire.

Friedemann Wagner July 16, 2021

mmh almost. 

i have the feeling that "parent link" is not the right element? What you can see in the action log is that the action is successful but the linked issue although the parent link looks good to meimage.png

image.png

image.png

Lisa Grau
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.
July 19, 2021

Ah, that could be.I didn't realize it's a story.

I'd suggest to either change the field "parent link" to parent, as Curt mentioned in the comment below or use the post-function he mentioned!

Friedemann Wagner July 19, 2021

thanks again, there is no "parent" as a field. I am trying to work in prallel on the workflow change.. 

 

thanks again for all your ideas. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events