Automation - trying to add user stories when creating an epic (with conditions) but it doesn't work

Max Boerma August 29, 2023

At the moment I'm testing if the flow works. What I want is this:

When I create an Epic (meeting certain conditions) I want to add several user stories under it. So the flow I was thinking of:

When: issue is created

IF: issue is an Epic

AND IF: Epic Name contains: Locatie Opleveren

AND IF: Epic has label: Team_LC

Then: Create Ticket 1

AND: Create Ticket 2

 

The problem is that I make the Epics and fulfill the criteria but no user stories are made. Could I be using the Epic Link in the create user stories wrong? I've selected Epic Link = Trigger Issue thinking that it will get the Epic name that triggered this automation. Automatically create user stories when making an epic.JPG

 

 

3 answers

1 accepted

1 vote
Answer accepted
Bill Sheboy
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.
August 29, 2023

Hi @Max Boerma 

When using the Issue Created trigger, that can fire very quickly...much faster than the rule has access to the issue's data.  This effect can cause conditions and other actions in a rule to later fail / not work as expected.

The work-around for this is to *always* add a Re-fetch Issue action immediately after the Issue Created trigger.  This will slow down the rule by about a second and reload the trigger issue data before proceeding.

Kind regards,
Bill

1 vote
Mark Segall
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 29, 2023

Hi @Max Boerma - Can you please share the audit log for this rule?

My first thought is that the 3rd condition should be labels contains any of rather than equals as I'm assuming that it is possible that the Epic has multiple labels which would cause the condition to fail.

Max Boerma August 29, 2023

Hi! Thanks for the reply. It seems like it worked but I needed to refresh the page. The user stories were made, but not as the same time as the Epic. So I couldn't see them at first. 

Like Mark Segall likes this
0 votes
David Blank
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.
August 29, 2023

HI @Max Boerma , getting the epic link wrong shouldn't prevent the story from being created, it would just not link the epic to the User story. This looks right to me!

 

Have you checked the Audit Log after creating an epic that matches your criteria to see if it is evaluating your issue? It is likely an problem with your conditions.

Max Boerma August 29, 2023

Hi! Thanks for the reply. It seems like it worked but I needed to refresh the page. The user stories were made, but not as the same time as the Epic. So I couldn't see them at first. 

Like David Blank likes this
David Blank
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.
August 29, 2023

I'm happy to hear it @Max Boerma ! Once you're sure you solved the problem would you mark one of the answers as accepted?

Personally, I like @Bill Sheboy 's  solution the most as re-fetching the issue data should ensure you'll be without problems when using the Issue Created Trigger.

Suggest an answer

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

Atlassian Community Events