Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

JIRA Automation s- Rule (If-Else???)

CHESTER RAMOS
Contributor
June 12, 2021

Hi All

I need some help. I am unsure if there is some bug with JIRA Service Management or there is some misconfig.

1. I have the following workflow for a service request which requires multiple approvals.
    1.1 A user will raise a request and the first approver will be his/her supervisor.
    1.2 "Unit Head" Status is utilizing the the following custom field in the next picture.
    1.3 The third picture shows the 'supposed' to be working automation rule
         along with the custom-field information (right below the picture)

2. Two days ago, a colleague and I were testing (me being the approver), I received 
    an email from "Automation for JIRA", clicking the provided link, I was promoted
    to approve/reject --- In other words... the automation rules were working.

Fyi: The rules as follow pretty straight forward rule

 

As of today, I am getting the following error message. "No Actions Performed"...

So I was wondering if there is a bug in JIRA.. or is there any way I can checked for a more detailed log...

Further more, since the organization I am working for is a multi-department working, I have the following if-else statement for my automation...

Thanks alot

 

Simple WorkFlow :

 

WorkFlow.JPG

Unit Head Approval Status = Single User Custom Field known as "Approver - Unit head"

Workflow-CustomField.JPG

 

Successful execution of Automation Rule above... 2 days ago.  

Succesful.JPG

 

 

Rule Start Failing Today.... 

rule fail.JPG

 

Also, after checking the SR queue for during my testing, instead of trigger the automation rule, I am getting this.... I need to manually add the first-approver as defined in the automation rule that was initially working. 

123.JPG

 

 

Lastly, after checking the automation log in the SR, not all automation rules were ran.

 

 

Another Questions

Would it be better to have multiple if-else rule for auto picking of Unit-Approver 

 

or One large if-else on-top of each other with different users define per if-else..

 

 

Multi If-Else Statement for "First Approver" (current setup)

rule fail.JPG

 

 

rule fail.JPG

2 answers

1 accepted

2 votes
Answer accepted
Mykenna Cepek
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.
June 12, 2021

Hi Chester, I have two thoughts here...

Firstly, based on your second post here, specifically the simplified "rule in other words", you can simplify your rule as follows:

  • Trigger: "Issue Created" (this is probably fine as-is)
  • Condition: "Issue Fields" (check user is in organization)
  • Condition: "Issue Fields" (check organization of end-user)
  • Action: "Edit Issue" (set Approver field)

You might not need an "If" or "if/else" condition at all. The advantage here is that simpler conditions provide more information in the Audit Log, and the rule is simpler.

Secondly, consider using the "Log Action" liberally, particularly to confirm your assumptions. For example, put a message in the audit log right after the trigger to confirm the fields of interest - In your case, at least user, org, approver. More Smart Values here.

I like to use the "Log Action" liberally to add "debugging" to my automation rules, when I am developing them. It helps me to understand both the flow of the rule, when it is executing, as well as inspecting the value of the issue that triggered it.

Hope that helps!

1 vote
CHESTER RAMOS
Contributor
June 12, 2021

Since the organization I am working for has multi department/sub departments
I have defined the following automation rule for my first "unit approver" 

Here is the rule in other words:
1. When issue is created.
2.  User who trigged the event 
     2.1 is in organization 
     2.2 "Organization of end-user" 
3. Then Edit-Issue field 
    3.1 Approver is The Unit Head... 

 

Current Automation rule 
1. Multi if-else statement. 
   In other words, each department heads or sub department heads will have his/her own rule.

if-else.jpg

 

2. Currently thinking if this if-else (nested) will be better than the one above...

Multi-Ifelse.jpg

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events