Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I use an automation so a child issue to inherit parent issue fields?

Mireya Cintora
Contributor
July 13, 2024

Objective: When a child issue is created in the parent (epic) issue, I want the issue to copy the parent issue's field onto the child issue. In my case I need 4 fields: 

- 2 custom fields: Facility & Payer/Entity

- Jira field : Labels

- Jira & Custom field: Member's Name to be copied from the parent summary field (Jira Field) that holds  the member name. 

Cheery on Top: If the parent issue field ever gets changed, then the child issue would update as well.

 

This is what I currently compiled based off some forums I found and some YouTube videos. Also I don't know anything about JSON or JQL coding :( 

Screenshot 2024-07-13 at 10.28.01 AM.png

3 answers

1 accepted

2 votes
Answer accepted
Trudy Claspill
Community Champion
July 14, 2024

Hello @Mireya Cintora 

Your rule is structured incorrectly.

You have the correct trigger. The rule will be triggered when an issue is created.

If you want the rule to proceed only if the created issue is a child of an epic then you need two conditions:

1. A Field Value condition: Issue type is one of... and select all the issue types that can be direct children of Epics.

2. A Related Issues condition: Parent exists

Then in your Edit action select the field you want to copy from the parent Epic to the newly created issue.

For each of those fields click the ... Button to the right of the value entry field and select COPY. That will prefill the entry field with a statement "Copy <the field> from Current Issue".

Click on that text. That will open a pop up with two pull down fields; one for selecting the issues to copy from, and one for selecting the field to copy from. Change the Issue Field to Parent.

What would you want to do if the child issues was moved from one Epic to another?

 

You will have to have a separate rule that is triggered by field changes in the Epic.

In that rule you can use the Field Changed trigger and select all the fields.

Then you would add a Field Value condition to confirm that the trigger issue type is Epic.

The you would add a Branch: For each / Related Issues / Children 

Then you would use the same Edit Action as the first rule.

 

You mentioned that you want to copy "Member's Name" from the Summary field. What type of field is "Member's Name"? Does the Summary field contain any text besides the member's name?

Mireya Cintora
Contributor
July 14, 2024

@Trudy Claspill 

1. Inheriting Rule: It was successful and i cant thank you enough for the help. For anyone who may need this here you go:

Screenshot 2024-07-14 at 5.19.06 PM.png

I did run into a problem but only because there is a field that is very common among other projects on our account so the automation keeps failing for that field: 

Screenshot 2024-07-14 at 5.23.38 PM.png

I tried to rename our project specific field but it does not appear on the list (Facility.) just added a period to make it stand out. So it suggested I use Advanced Editing which requires JSON which I know nothing about. However I do know that the custom field customfield.10068 which I am assuming ill need?

Screenshot 2024-07-14 at 5.19.45 PM.png

2. Member's Name: This Member's Name field is a short text custom field for the child issues. But in the parent card it does not exist as the name will be in the summary system field. So I want to have an automation to copy that summary system field and edit the short text Member's Name custom field. But since they are technically two different fields I have no idea if we can do that. 

Trudy Claspill
Community Champion
July 14, 2024

#2 Regarding the copy of the Summary field to the Member' Name field, look at my previous response at the paragraph that starts with "Click on that text."  In the popup I mentioned there you can change the source issue and the source field. Select the Summaey field as the source field.

#1 Is the Facility field one that you can edit manually for the issue? What is the field type for that field? You may indeed need to use Advanced Editing. We can provide specific guidance when we know the field type.

Mireya Cintora
Contributor
July 15, 2024

@Trudy Claspill 

2. So I did that but its copying the parent summary field to the child summary field. But I need the parent summary field to copy to the Member's Name field on the issue. 

Parent Issue

Screenshot 2024-07-15 080549.png

Child Issue

Screenshot 2024-07-15 080716.png

1. Yes, the Facility is something we manually input. It is a short text field. We did want to utilize the drop down or checkbox field but we are limited to 55 options...

Trudy Claspill
Community Champion
July 15, 2024

#2 Please show us a screen image from the Edit action in the rule showing the details for where you set the Member's Name field. It should look something like this:

Screenshot 2024-07-15 at 11.36.53 AM.png

 

 

#1 to use Advanced Editing to set the Facility field you would use this code

{ 
"fields":{
"customfield_10068": "{{issue.parent.customfield_10068}}"
}
}

Make sure that there is no other code in the JSON field other than what I've shown above. 

Mireya Cintora
Contributor
July 16, 2024

Awesome both solutions worked for me! Cant thank you enough, our workflow is alot smoother now!

Like Laurie Sciutti likes this
0 votes
Joseph Chung Yin
Community Champion
July 14, 2024

@Mireya Cintora 

Again, I agreed what @Trudy Claspill suggested.  The biggest issue in my opinion is that you want to copy parent's Summary field (portion of the value) for your child issues.  Keep in mind that Summary field is a single line text field, thus there is no nomenclature controlling what one key into the field.

Please provide more information on your ask, so we can further assist you.

Best, Joseph Chung Yin 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events