Automation : copy a custom field between EPICS of the same project

christophe demez April 26, 2023

Hi,

 

Imagine I have a new project and I create my first EPIC, I have a custom field where I set a value. Example

uffective = "ABCD"

Later, once an EPIC is created, I wish to update all their field "uffective" to the same value than the first EPIC. This value must be the same for all the EPICS in the same project.

I'm trying to use automation for this, but I can't find a solution.

Here are the steps I have in mind:

1) Scheduled Query: all the EPICS with uffective is EMPTY
2) Copy value: copy the uffective value somewhere as a global variable (in the context of the automation)
3) Other query: for all the EPICS copy the value in the uffective field

2 answers

2 votes
Callum Carlile _Automation Consultants_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 26, 2023

Hi @christophe demez 

If all Epics within the project need to have the same value given on creation, you could either set a default value for this field (so no need to use automation), or could you not just hard-code the value within an automation rule, if that rule is scoped only to that single project?

Or do you want the field across all other Epics to be updated if the field is updated on any of the existing Epics?

christophe demez April 26, 2023

Thanks @Callum Carlile _Automation Consultants_ , but unfortunately I have plenty of project and the value is different for each project. I do not have any data/metadata on the project so I cannot copy from there. It is why I try to copy from any EPIC in the same project. You see ?

Callum Carlile _Automation Consultants_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 26, 2023

Fair enough, this definitely sounds possible.

Could you just have a simple automation rule scoped to that single project which triggers on creation, has a condition to only action for Epics, then hard-code that value you wish to set for it within the Edit Issue action?

Or do you want it to be dynamic so that if the field value is changed on one of the Epics then it will change for all other Epics within the project?

christophe demez April 26, 2023

It is an option, but in fact we have a lot of such projects, and adding more and more of them. It is why a dynamic approach will be better... the peoples that are managing such project doesn't have the JIRA automation skills.

Callum Carlile _Automation Consultants_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 2, 2023

Hi @christophe demez, what about something like this:

cr1.png

This rule would trigger off any changes made to your custom field (in my example I am using a field called "Change Reason"). This trigger has been set to run on any issue operation, so would trigger if the value is set on edit or create.

This rule has also been scoped to All Projects, so if any more projects are created, the same rule will apply. This was one of your main requirements, however keep in mind that if your custom field is going to be updated in lots of places across your instance of Jira, the rule may throttle due to the large load.

I then added a condition to check that the field is not empty - as if I create an Epic with this field value empty, I would not necessarily want this to clear the field values in all other Epics.

I then use a branch to find and action all other Epics within that project:

cr2.pngNote here that I have not checked the 'only include...' checkbox, as I would always want this field to update. Something to be aware of here is that if you have a large number of Epics within your projects, this rule may start to struggle with the load.

And then add an Edit Issues action underneath this. In this, I have set a smart value to set the field in all of these Epics to the same value that triggered the rule.cr3.png

As I've said, this rule should require minimum maintenance for any new projects being added, but do keep in mind that there are service limits for automation rules across an instance of Jira, so keep an eye on how frequently the rule is running as well as the total run time.

Hope this helps!

0 votes
Thibaut Subra _Elements_
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.
April 27, 2023

Hello @christophe demez 

I just checked your post and if you don't mind using third-party app, our Copy & Sync can give you a solution.

You can create what we call a recipe where you can define how you copy and synchronize fields, comments, attachments, or whatever.

So, in your case, you can create a recipe where, when triggered, you copy and synchronize the value of your custom field "uffective" from the Epic source.

That way, when you want to create a new Epic, you just open your source Epic, trigger the recipe and it will automatically create a new Epic with the custom field "uffective" with the value "ABCD". If you chose to synchronize this field as well (and not just copy it), when you will update the value of "uffective" on your source Epic, the field of all other Epics will be updated with the new value.

I hope this helps. If this is the case, you can try our app for free during 30 days (and it's lifetime free under 10 users).

Let me know if you have any questions!

Regards

christophe demez April 27, 2023

Thanks, but we are not allowed to add any add-in into JIRA. I can't do that unfortunatly.

Suggest an answer

Log in or Sign up to answer