How can I change the EPIC color via automation?

Jacques_Uhlemann May 23, 2020

Hey Community!

 

I want that if a label has value X the EPIC color is set to color X.

There is no predefined field to change the EPIC color via automation. After hours of research and many failed automations I now turn to you.

I think it should be easy to do this by using additional fields, I think I just need the command to set the color of the current EPIC to X. But how can I do that?

7 answers

1 accepted

2 votes
Answer accepted
Jenny Severin August 10, 2021

I was able to use Automation for Jira today for my use case, which was to change the color of the Epic when a specific custom field (SoW Signed) was changed to "Yes." 

I discovered that there was already a custom field called "Epic Color" and I found the color codes online. 

I'll list them here for simplicity:

ghx-label-1         Black

ghx-label-2         Dark Yellow

ghx-label-3         Light Yellow

ghx-label-4         Dark blue

ghx-label-5         Dark Aqua

ghx-label-6         Light green

ghx-label-7         Light Purple

ghx-label-8         Dark purple

ghx-label-9         Light Pink

ghx-label-10       Light Blue

ghx-label-11       Light aqua

ghx-label-12       Light gray

ghx-label-13       dark green

ghx-label-14       dark coral/red(ish)

 

319BA0AF-6147-4F20-9313-0CCC7DFB0780_4_5005_c.jpegD99781D4-6F8F-465C-94BF-71E100CF27B9.jpeg

John Funk
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 10, 2021

Yes, this would be the preferred solution now. 

Like # people like this
Mark de Bont May 19, 2022

Great automation.

Update //19-05-2022 noticed that the customfield number has changed (at least for our instance) and the colour labels do not match. So you may want to check these. But the solution is still valid.

Like Jan Stähle likes this
Josh Meyer July 20, 2022

I followed the script above, replacing it with the custom field id number for Epic Color in our instance, but it kept erroring out.

I then replaced "customfield_10013" (the custom field number for our instance of Jira) with "Epic Color," and it worked.  

Like # people like this
Stuart Nealis August 25, 2022

Thank you @Josh Meyer for posting this - worked like a charm for me. 

Like Josh Meyer likes this
Jordan Ryan September 3, 2022

thanks @Josh Meyer for pointing that out!

Like Josh Meyer likes this
Maria Mendieta December 22, 2022

This did not work for me. Do I need to unlock the field?

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 22, 2022

What did not work? Did you get an error? What happened?

alejandra.jimenez August 18, 2023

Im having this error, can someone help me?? :(

Capture.JPG

1 vote
Tanja Berner February 8, 2021

Hey everyone :) 

I asked myself the same question today. Did I understand it correctly that there is no way to set a Epic color for a individual label? Or has something changed in the meantime?

Thank you so much.

Beste Regards

Tanja

1 vote
Radhika Vijji _Innovalog_
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.
May 25, 2020

Hi Jacques,

Note JMWE can perform the action only during a transition. With JMWE in your instance, add the "Set field value" post-function to the transition to set the Epic Color field to X. Select the conditional execution checkbox in the post-function configuration and check the labels. 

{{ issue.fields.labels.includes("X") }}

Regards,

Radhika 

0 votes
Joachim Brechtel November 1, 2023

It's also possible to add "Issue color" to the Create-Screen and to add the following to the automation:

{
"fields": {
"Issue color": "orange"
}
}

Then you don't have to apply the label to color mapping.

0 votes
John Funk
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 24, 2020

Hi Jacques - Welcome to the Atlassian Community!

I don't think you are going to be able to do that using Automation for Jira. You could do it using a Post Function on a Transition in the workflow however using the JMWE add-on. 

Jacques_Uhlemann May 25, 2020

Hey @John Funk ,

 

thank you for your fast answer.

Can you describe this in more detail? I don't understand the procedure.. That would be really great!

John Funk
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 25, 2020

You would need to add the Jira Miscellaneous Workflow Extensions (JMWE) from the Atlassian Marketplace. There is a charge for this. 

0 votes
Marcel_Wolf May 23, 2020

This is also an interesting question for me too!

Suggest an answer

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

Atlassian Community Events