Forums

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

Why does the first IF trigger correctly in an Automation rule but the 7th ELSE IF does not?

Mike Gourley July 10, 2023

We have an Automation rule with an IF and 7 x ELSE IF.  The test is simply Issue matches Organizations in (orgName1, orgName2, orgName3)  THEN Add organizations to issue (orgName1, orgName2, orgName3).   We have identified 8 groups of our customer organizations where within one group there are 2 or more Organizations each of which essentially represents an branch office of the group.  So the goal is when a service request logged by one office then the other offices in the group are added to the list of Organizations and that then makes all uses in all offices able to see the service requests logged by all staff in all offices.  We have evidence showing in the log view of the Automation rule that new service requests logged by users within the Organizations of the first IF / THEN in the rule, and the 1st ELSE IF / THEN of the rule, the rule has trigged correctly and the THEN was executed. But the latest group we added to the rule, the 7th ELSE IF / THEN is not triggering. Looking for any suggestion as to why the "Issue matches Organizations in ...." in the latest ELSE IF branch of the Automation rule is not triggering?

1 answer

1 accepted

0 votes
Answer accepted
Mark Segall
Community Champion
July 10, 2023

Hi @Mike Gourley - It would be helpful if you could please provide screenshots of your rule and rule log. This would provide added context in understanding where things are going wrong.

Mike Gourley July 11, 2023

Hi Mark, thank you for the reply.  I've created a series of screenshots that hopefully help.  Names of customer orgs and accounts are blurred.  Here goes...

1. the set of Automation rules with the rule in question indicated

Automation rules.png

2. the top part of the Group Organizations rule

Automation rule - Group Organizations - top part.png

3. the bottom part of the rule with the last ELSE IF selected in its editor, this is the ELSE IF org group that we can't get to work as expected

Automation rule - Group Organizations - Edit IF.png

4. the THEN portion of the last ELSE IF in its editor, which never executes because the ELSE IF for this group will not get a successful match

Automation rule - Group Organizations - Edit THEN.png

5. This is an example of a successful execution of the rule for a service request that had a successful match in the 2nd group, the first ELSE IF.  The THEN part executed as expected and added several additional orgs to the Organizations field for this service request.

Successful match and execution of adding more orgs to org field.png

6.  This service request is an example of a failed result.  The service request CSR-57404 failed to match the org of the Reporter to the list of org in the ELSE IF, the most recent ELSE IF added to the rule.

57404 Failed match.png

7. The service request CSR-57404 view screen with the Reporter and Organization indicated.

CSR-57404 View screen.png

8. The Customers screen with the Organization and its list of accounts of which the firs account in the list is the Reporter of CSR-57404

Customer org and accounts.png

Mark Segall
Community Champion
July 11, 2023

Thank you for the screenshots.  It looks like you're using a legacy version of automation on a legacy version of Jira Server (Note - Jira Server goes end of life in February 2024) so you should consider either migrating to Data Center if you need to stay on-prem or consider migrating to Jira Cloud.  Both of which have far more robust native automation capability.

I'm not as familiar with that version of automation, but it may be possible that you're running into a limitation.  I would try swapping your 7th Else condition with say, the 2nd Else condition.  This would simultaneously prove...

  1. Whether there are any issues with your condition
  2. Whether you're hitting a component limit in your rule
  • If the condition suddenly works as the 2nd Else condition and the new 7th condition fails, you're dealing with a limitation. 
  • If the condition continues to fail and the condition that was moved to 7th continues to work, there's something wrong with your condition.
Mike Gourley July 11, 2023

Hi Mark,

Thanks for the input.  We are using Jira Data Center v8.22.6 and stopped using Jira Server a couple of years ago.

We solved the problem today.  It turns out that the failed "Issue matches Organizations in" condition was due to...

  • for the service request that failed the ELSE IF condition in the screenshot above, the Reporter was in organization_A
  • other customer user accounts (not the Reporter account) in organization_A were also associated with organization_B and organization_C, because of some previous work to attempt to associate customer user account with more than one org
  • we removed any associations with organization_B and organization_C for any user account in organization_A so that all user accounts in organization_A were associated only with organization_A
  • using a test user account in organization_A we submitted a test service request and the 7th ELSE IF in the rule worked as expected and the THEN was executed and organization_B and organization_C were added to the Organizations list in the test request.  It worked!

Thanks for the help.

Like Mark Segall likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events