Copy two custom fields from Epic to all created issues within the project

D.NewberryDeGuzman August 17, 2022

Hi gurus! 

I'm relatively new to Jira so I badly need your help to build a global automation rule.

I have an specific Epic within every single project in our org that contains in its name word "Metadata" (example: project 1 Demo - Matadata).

When any issue type is created in each project in my org, two custom fields (Project Tracking ID and Project reference) should be copied from this project's Epic "project 1 Demo - Metadata" to  all issues within this particular project. 

Accordingly for project 2 all issues will look for the Epic " project 2 Demo - Metadata and so on.

Can you help me with it, if possible with details.

Thank you very much in advance!

 

1 answer

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 17, 2022

Hello @D.NewberryDeGuzman 

Welcome to the community.

I have a couple of questions.

1. Does each project have one and only one Epic with the work "Metadata" in it?

2. Are the issues being created being made child issues of that Epic never/sometimes/always?

3. Have you reviewed your Global Rule execution limit and considered how many times this would run to ensure you will not exceed your limit?

4. How many projects are there? If the number of executions might exceed your limit, you could opt to create a rule per project if that is not an onerous task.

D.NewberryDeGuzman August 17, 2022

Hi Trudy, 

Thank you for your message.

Please, find my answers below:

1. Does each project have one and only one Epic with the work "Metadata" in it? - Yes, there is only one Epic in each project that contains the wording " - "Metadata". We can give to all this Epics only one name for example "Project Metadata"

2. Are the issues being created being made child issues of that Epic never/sometimes/always? - Unfortunately, no! 

3. Have you reviewed your Global Rule execution limit and considered how many times this would run to ensure you will not exceed your limit? - We have this rule only for company managed projects. Yes... that is a good question. We have only 1000 executions per month. I presume I need to add only those project that will be a part of it.

4. We have over 1200 project but I need to work with 162 so far! 

 

Thank you again!!!

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 17, 2022

It took me a while, but I finally got it.

Edit: My apologies. My response here is copying values from the Epic's Labels field. While valuable to know how to do that, you were not asking about copying values from multi-value selection list fields. Will be back shortly with another response that shows the rule doing a simple copy from single-value fields.

Here's the overview

Screen Shot 2022-08-17 at 1.37.03 PM.png

If you don't want this applied to every type of issue created, then you would want to add a Condition right after the trigger to check issue type.

Here are the details of each component after the trigger.

This looks for the Epic in the same project as the trigger issue, with the text you want to specify for the Epic Summary field.

Screen Shot 2022-08-17 at 1.38.04 PM.png

This confirms that you have found one and only one Epic that matches your lookup. If more than one is found, or none are found, the rest of the rule does not run.

Screen Shot 2022-08-17 at 1.39.13 PM.png

This drives an iteration through all the values in the Labels field of the found Epic, assigning the value to a variable with each iteration.

Screen Shot 2022-08-17 at 1.40.26 PM.png

And this adds each Label value from the Epic to the Labels field of the trigger issue.

Screen Shot 2022-08-17 at 1.41.55 PM.png

Like D.NewberryDeGuzman likes this
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 17, 2022

Here's the version for copying values from simple single entry fields.

Screen Shot 2022-08-17 at 1.51.10 PM.png

 

Screen Shot 2022-08-17 at 1.51.26 PM.png

 

You would replace <custom field id ...> with the actual custom field id for the respective fields.

D.NewberryDeGuzman August 18, 2022

Hi Trudy! 

God Bless you!!! I really fill uncomfortable that you helped me by spending so much time for me!!!

Thank you a million! 

Demi

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 18, 2022

@D.NewberryDeGuzman 

You're welcome. It was a skill building exercise for me, so it was worth the time spent.

If my response solves your issue, please mark it as Answer Accepted to help other community users find the posts that provide solutions.

Suggest an answer

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

Atlassian Community Events