Automation - create an epic if a task is created and link the task to the epic

Christophe July 8, 2024

Good morning,

I am new in the Automation world. 
I want to create a script that does the following:

When a new issue is created

  1. Check if the issue is a Task
  2. IF the Task is not linked to an epic ("Parent" field)
    1. Create a new epic
    2. Link the task to the newly created epic
  3. ELSE the task is linked to an epic ("parent" field)
    • Do nothing

I have created the following workflow, but it doesn't work.

Screenshot 2024-07-09 095229.png

Is there someone that could assist me?

Thanks

3 answers

1 accepted

4 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 8, 2024

Hello @Christophe 

Welcome to the Atlassian community.

In exactly what way is it not working? Can you share with us the output created in the rule's Audit Log when the rule executes?

One problem with this rule is that you are creating a variable within the branch and then trying to use it outside of the branch. That won't work. When the branch completes its process, the variable will cease to exist.

I would instead use a rule like this:

Screenshot 2024-07-08 at 5.21.19 PM.png

Christophe July 8, 2024

Hi @Trudy Claspill 

Thank you for your answer. 

It works perfectly!

Screenshot 2024-07-09 103320.png

Like # people like this
0 votes
Christophe July 8, 2024

Hi @Nicolas Grossi 

Sure.

Screenshot 2024-07-09 101900.png

Looks like it's a JSON issue (which is an unfamiliar language for me):

{
"fields": {
"parent": {{varEpicKey}}
}
}

 

0 votes
Nicolas Grossi
Banned
July 8, 2024

@Christophe Welcome! Could you please add the error log ?

 

Nicolas

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events