Forums

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

Automation possiblity and logic -_-

Térence LECROIX
Contributor
August 18, 2023

Hello,

 

We are trying to create an automation with multiple variable and I can't find a good way to do it.

Here is the resume : 

  1. We have 5 fields (cascading list)
  2. We'd like to determine if the issue is in those case (only for the first value of the cascading list) : 
    1. 1 of the 5 fields has the value XYZ and all other are empty
    2. 1 of the 5 fields has the value UVW and all other are empty
    3. 2 of the 5 fields has the value UVW and XYZ and all other are empty
  3. If none of those case then add an internal comment

 

I assume that it is possible but I'd like your advise on how to do it and if possible without creating an unreadable automation ^^

 

Thanks for your help

3 answers

2 accepted

0 votes
Answer accepted
Térence LECROIX
Contributor
August 18, 2023

Hello thank you for your answers, that's what I was trying to use but could find the logics to operate to achieve my goals.

I think that I just found what I wanted : 

With an if/else block

  1. 1st condition : Test if at least one of the five fields are not empty with JQL
  2. AND
  3. 2nd condition : Test for each field with JQL
    1. ((Field 1 in (XYZ,UVW) OR is EMPTY) AND (Field 2 in (XYZ,UVW) OR is EMPTY) AND (Field 3 in (XYZ,UVW) OR is EMPTY) AND (Field 4 in (XYZ,UVW) OR is EMPTY) AND (Field 5 in (XYZ,UVW) OR is EMPTY))
0 votes
Answer accepted
Ste Wright
Community Champion
August 18, 2023

Hi @Térence LECROIX 

Have you tried using the Condition IF/ELSE?

This Condition allows for AND/OR based conditions - you could then tie multiple conditions together.

For a cascading field, I'd probably use a JQL Condition for the multiple conditions, then set it to "At least one condition matches" to make it an OR statement.

You could then...

  • Check if any of those situations exist
  • If yes, set the relevant action
  • ELSE if not, add an internal comment

Ste

0 votes
Joseph Chung Yin
Community Champion
August 18, 2023

@Térence LECROIX -

Excellent suggestion by @Ste Wright - on using the JQL condition to build out your logic for the automation rule.

If later on, that you need to test out child option of a cascade list and wanting to know how ot use other conditional usage of automation instead of JQL, then you can use smart value syntax to test out against a cascade list field -

Example -

My Cascade Field values are: {{issue.Country-City}} ***** Actual Parent value: {{issue.Country-City.value}} ***** Actual Child value:{{issue.Country-City.child.value}}

I use the Log Action as a part of my process when configuring my automation rule for debugging process.  In the above example - My custom field is "Country-City" where I want to get the parent option and child option associated to an issue by using the syntax of "value" (parent) and "child.value" (child).

Hope this also helps.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Technology Applications Team

Viasat Inc.

Suggest an answer

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

Atlassian Community Events