Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Automations Will Not Loop to Create Multiple Sub-Tasks on the Same Issue

Savannah Davis November 14, 2024

Hello! Any help is very much appreciated! I'm trying to make several automations for different applications under different request groups that aren't all selected at the same time or can all be selected at the same time. In this case, we need the automation to loop. There are several applications listed under different request groups. For this example, I've listed 3 below. 

  • Finance includes - ApplePay & Adyen Portal
  • Digital includes - Figma and DAMS
  • Atlassian Suite includes - Wiki & Jira Software


Expectation:
When creating these automations, we split them up by request group, but they all have the same trigger and are most likely running on the same issue that was just transitioned. They are expected to all run and then populate sub-tasks based on which criteria they met. For instance, if the user selects Adyen Portal from Finance and then Wiki from Atlassian Suite, two sub-tasks should be created on the parent issue. One being Adyen Portal & the other Wiki. 

 

Problem: It will ONLY create sub-tasks for the 2nd, 3rd, and so forth conditions if the 1st condition is selected by the user. It does not continue down or loop. The automation will run, but skips some applications or request groups all together. For instance, if the user selects Adyen Portal from Finance and Jira Service Desk from Jira, the only sub-task that is created is Jira Service Desk. It skips Finance because Adyen Portal is listed 2nd in the automation, but will create the sub-tasks for Jira Service Desk because it is listed first in the automation. 

 

Troubleshooting:

  1. Adding in the re-fetch issue data between IF conditions, but this made no difference.
  2. Using IF and then IF/Else
  3. Adding IF between each each condition and then an AND condition. 


Current Automations

Digital_1.pngAtlassian Suite_1.png


Example of Troubleshooting 3

Finance_1.png

 

1 answer

1 accepted

1 vote
Answer accepted
Aaron Pavez [ServiceRocket]
Community Champion
November 14, 2024

Hi @Savannah Davis 

This is because you are using IF instead of IF/else.

with IF if one condition matches, will skip the other.

you need to use IF/else.

Regards

Aaron

Savannah Davis November 14, 2024

Hi @Aaron Pavez [ServiceRocket] 

I will try this now & report back! 

Savannah Davis November 14, 2024

@Aaron Pavez [ServiceRocket] 

I have added in the IF/Else to one of the automations and tested it. See the new automation below. When testing it, I chose Wiki & Jira Software as they are 2nd & 3rd in the automation. A sub-task for Wiki was created, but no sub-task for Jira Software was created. How can we update this so that both sub-tasks are created here? 

 

Atlassian Suite_2_IFELSE.png

Like Samantha Matthews likes this
Aaron Pavez [ServiceRocket]
Community Champion
November 14, 2024

Hi again!

Now I get the full picture and what you need to achieve.

Sadly the if/else will work just the same, once one of them is TRUE then it doesn't go into the other IFs.

https://support.atlassian.com/cloud-automation/docs/jira-automation-conditions/

The only way to work this out is as mentioned here:

https://community.atlassian.com/t5/Automation-articles/Why-Automation-rules-with-IF-ELSE-may-need-several-executions-to/ba-p/1682918

Here is the important part: (thanks @Rodrigo Martinez for the amazing explanation)

So if you want all 4 conditions to be applied in the same Automation rule, you may do something like this (just an example) using the same IF / ELSE Blocks but without using the ELSE, just adding several IFs branching to each action:

IF (condition A)
THEN action A

IF (condition B and not A)
THEN action B

IF (condition C and not A and not B)
THEN action C

IF (condition "not A and not B and not C")
THEN action D

 regards

Like # people like this
Savannah Davis November 20, 2024

Hi @Aaron Pavez [ServiceRocket] Thanks for the response! I have tried to implement this and I'm still finding that no issues are created (I did update the trigger to Issue Created from Transition to save time when testing this). Could you take a look over these? Thanks!

 

IF issuetype in ("Onboard User", "Access Request") AND "Atlassian Suite" = "Jira Service Desk (ASSET-)"
THEN Create Issue


IF issuetype in ("Onboard User", "Access Request") AND "Atlassian Suite" = "Jira Software (ASSET-)" AND "Atlassian Suite" not in ("Jira Service Desk (ASSET-)", "Wiki (ASSET-)")
THEN Create Issue


IF issuetype in ("Onboard User", "Access Request") AND "Atlassian Suite" = "Wiki (ASSET-)" AND "Atlassian Suite" not in ("Jira Service Desk (ASSET-)", "Jira Software (ASSET-)")
THEN Create Issue

Using IfElse (ONLY IFs).pngUsing IfElse 2.png

Aaron Pavez [ServiceRocket]
Community Champion
November 20, 2024

Hi Again!

If I understand correctly:

2 issue types = Onboard user and Access request. this remains the same

One "picklist"? = This is the one that changes and you create the Task based on this picklist.

This should work:

2024-11-20 16_50_18-Audit log - Automation - CaseSF - Jira — Mozilla Firefox.jpg

Notice the IF before the IF. That's what you are missing.

2024-11-20 16_51_09-Audit log - Automation - CaseSF - Jira — Mozilla Firefox.jpg

Regards

Aaron

Like Savannah Davis likes this
Savannah Davis December 4, 2024

Hi @Aaron Pavez [ServiceRocket] !

 

Apologies for the delay here. I tried this out & it works! I tested it on a few other applications and it's still working just fine! My team and I are very, very grateful for your help with this! Thank you!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events