Automation: Set Epic failing

Colin April 12, 2023

I have an automation that when an Issue is created it checks it is an Issue type of Story or Bug then sets the Epic to a defined 'Review' epic we use (this is so all new stories are in the same Epic).

This seems like it should work and the Log is saying Success, it does other things, but the Epic is not being set.

The Log is saying Issues edited successfully for that part.

I have tried setting the epic to empty first and then setting to my required epic and both are success but again the epic is not being changed from where it is raised.

Any ideas or what I can do to make this work?

Thanks

2 answers

1 accepted

0 votes
Answer accepted
Najm Polaris
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 12, 2023

Hi @Colin

I tried the following automation and it seems to be working. See if this helps

 

download (4).png

Colin April 12, 2023

Hi @Najm Polaris 

This is what I've done effectively and it looks like it doesn't work but when I check the issue history as per @Jared Kells question there are two updates happening when I create a new story.

Maybe it's a case of the automation is happening before the story has been fully created as the automation step in history is between the create issue and the Epic Link change and Rank setting.

So it looks like the story creation is setting the Epic link back after the automation has changed it.

It's interesting that this doesn't happen for you, any ideas how/why?

Najm Polaris
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 12, 2023

@Colin can you please check if there are any other automations in place?

 

You can see all the automations that were triggered along with the details from the audit log under the actions button in the issue created. 

 

download (5).png

Colin April 12, 2023

@Najm Polaris there is no other automation in place and looking at the Activity, only the one automation fired that set the epic link as required.

The problem seems to be timing as this automation is firing and completing before the story has fully created so the epic is being set back to the original epic it was created against after the automation is complete.

I can't see any way to have the automation fire after all actions are complete to prevent this.

Any ideas?

Najm Polaris
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 12, 2023

@Colin if that's the case then you can run the  "re-fetch" action before assigning the epic and see if it resolves your issue. 

download (6).png

Like Kelly Arrey likes this
Colin April 12, 2023

Hi @Najm Polaris 

Fantastic, that got it and it's now working - thank you!

Like # people like this
0 votes
Jared Kells April 12, 2023

Hi Colin,

Welcome to the community.

On the issue view itself there is a history tab that shows all changes to the issue, is there any rows in there indicating that the epic link was changed?

Colin April 12, 2023

Hi Jared

Thank you, my first couple of questions on here after finding nothing matching and I'm a bit stumped.

Good question, I haven't looked there.

I've just created a new Story and looking in my automation Audit Log it is showing success for the Edit issue.

Looking at the issue itself, in History it has two changes for that area made - 

The automation change

  • Epic Link
  • Original Value {empty}
  • New Value PT-408

A change by me (I did not make this change)

  • Epic Link
  • Original Value PT-408
  • New Value PT-3

PT-408 is what I am wanting to set the epic too

I'm confused why there are two changes, mmm

Colin April 12, 2023

So it looks like the automation is setting the epic to PT-408 as expected but then there is an additional step, not sure where that is coming from, setting it back to the original :-O

Suggest an answer

Log in or Sign up to answer