Forums

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

When an issue is created, copy custom fields from the Parent/Epic

christopher_branaman January 26, 2024

JIRA Cloud > Company Managed Project > Templates for JIRA

When creating a new Issue (Story or Bug), I would like to auto-populate 2 custom fields from the Parent (Epic) down to the new Story. 

I've read multiple posts with the same or similar issue and attempted what seems to be the most common solution, however I cannot get it to work.

Here is the Automation Rule I tried as well as the error log. 

 

Screenshot (76).png

The puzzling thing is the error log, because the custom field is definitely assigned to the Project.

Screenshot (75).png

2 answers

1 vote
Jack Brickey
Community Champion
January 26, 2024

Hi @christopher_branaman , 

I would recommend that you use a smartvalue with custom Field ID rather than name. If you go to your settings and then in the sidebar select custom fields find your field and edit details. In the URL you should see the customer field ID at the end. for example...

xxxxx.atlassian.net/.....?id=10065

so it might look like...

{{issue.customfield_10065}}

christopher_branaman January 26, 2024

That did not seem to work, unless I did something wrong.

In the Epic template card, under smartvalues I selected the two custom fields with a value to parent.

In the Story template card, under smartvalues, I selected the two custom fields with a value of 
primaryIssue.field("custom field name")

that didn't work.

I also tried using 

primaryIssue.customfield_0000

That also did not work.

* I think I forgot to mention previously that we are using Jira Templates. For that reason I'm thinking that's why smart values did not work and it would need to be an Automation, because the Epic template and New User Story template are not linked. 

e.g.

We have an Approval story card template, with 4 other cards that are related to the Approval process linked to it. So when you create the Approval card, the other 4 cards are also automatically created. In this situation I am using smartvalues to search for a value from the primary Approval card, and autopopulating it to all of the other related cards. 

So I'm not sure Smartvalues would work in my use case of wanting to search for a value from an Epic card and copy it down to a story card.

0 votes
Bill Sheboy
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 26, 2024

Hi @christopher_branaman 

Are all of the fields you want to use in both issue types for the parent and child issues?

Is the "Target End" field you are referencing the one from Advanced Roadmaps?  If so, I believe such fields are not fully supported by automation rules (by name), and the work-arounds involve using the custom field id with a smart value, such as @Jack Brickey describes, with an advanced edit with JSON.

https://jira.atlassian.com/browse/AUTO-994

https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#Date-picker-custom-field

 

Kind regards,
Bill

christopher_branaman January 26, 2024

Yes it is the one from Advanced Roadmaps. And I "think" I tried doing it the way it was suggested using smart values.

In the Epic (parent) template card, under smart values I selected the two custom fields with a value of parent.

In the Story template card, under smart values, I selected the two custom fields with a value of 

primaryIssue.customfield_0001

primaryIssue.customfield_0002

That did not produce any results.

Bill Sheboy
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 26, 2024

Would you please post an image of your Edit Issue action?  Thanks!

Suggest an answer

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

Atlassian Community Events