Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,361,403
Community Members
 
Community Events
168
Community Groups

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

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

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.

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!!!

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

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.

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

@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
Community showcase
Published in Jira Software

An update on Jira Software customer feedback – June 2022

Hello Atlassian Community! Feedback from customers like you has helped us shape and improve Jira Software. As Head of Product, Jira Software, I wanted to take this opportunity to share an update on...

5,070 views 18 32
Read article

Atlassian Community Events