Forums

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

OR in automation for JIRA

Petr Nový
Contributor
April 3, 2020

Hello, is it somehow possible to use OR operator when using multiple conditions in Automation for JIRA? 

2 answers

1 vote
Michelle Gronwold
Contributor
August 28, 2024

Not sure if you found help, but this link helped me solve for a similar problem I was having. Assigning issues using an if/else condition.

How to auto assign issues with Jira automation | Atlassian

0 votes
Ste Wright
Community Champion
April 13, 2020

Hi @Petr Nový 

What are you trying to achieve?

I'm not sure if it is possible to move from AND to OR - but it might still be possible to create what you're looking for the rule to do using an alternative method.

Ste

Petr Nový
Contributor
April 14, 2020

Hi @Ste Wright ,

Thanks for reaching out. I would like to create rule which will trigger on comment which occurs in

  • In certain project
  • OR by certain creator, regardless on project
  • OR with certain comment properties, regardless on conditions above.

So far, I have created multiple independent rules, with same outcome. This is not great solution, as 

  1. Multiple rules may trigger simultaneously -> multiplying outcome.
  2. It is difficult to maintain.
  3. It have performance drawbacks, as 3 (possibly asynchronous?) rules will be triggered for one event.

Therefore single rule with complex condition would be much better. I just dont know how to do it  :-)

Thanks in advance

Petr

Like # people like this
Petr Nový
Contributor
April 14, 2020

Hi @Ste Wright ,

Thanks for reaching out. I would like to do certain action when an issue is commented in one of following conditions:

  • Issue is in certain project
  • OR issue is being commented by certain user
  • OR comment have specific comment property.

So far, I have created multiple independent rules - one for each OR condition. it have several drawbacks:

  1. Extensive maintenance - changing outcome have to be updated for multiple rules.
  2. Performance - 1 listener is better than 3
  3. It can potentially trigger multiple times, possibly duplicating the  outcome.

Therefore it would be best to have only one automation rule for this. I just do not know how to achieve that :-)

Thanks in advance

Petr

Darryl Lee - CCC
Contributor
September 24, 2020

I think you have to use a JQL condition:

```project=FOO OR reporter="VIP"```

Like # people like this
Ste Wright
Community Champion
September 26, 2020

Hi @Petr Nový 

Apologies for not coming back to you on this question!

In case this is still needed, you can create an "OR" statement utilising Else/If. You can create multiple layers (more than two) using this condition, and it should avoid duplicate actions unlike multiple rules.

See how to utilise Else/If on this page.

Ste

Like Karl Becker likes this
Oleksandr.Ruzhylo
Contributor
September 7, 2023

Hello all.

Is it possible to use the following structure:

(Condition 1) AND (Condition 2 OR Condition 3).

Where Condition 1 is mandatory.

How it's possible to implement? 

Like Sylvain Chabot-Beaulieu likes this
Ste Wright
Community Champion
October 7, 2023

Hi @Oleksandr.Ruzhylo 

It should still be possible using IF Block - eg.

  • Trigger: Issue Created
  • Condition 1: ...
  • Condition 2/3: IF Block
    • IF...
      • Run actions if = At least one condition matches
        • Condition 2
        • Condition 3
  • Action: ...

^ The first condition must happen, it's a requirement to get to 2/3.

But the IF Block can be set to be either/or - so if either are true, then the action runs

Ste

Like # people like this
Katie Downing-Powell
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 10, 2024

This would be a very useful function for my organization, as well.

Suggest an answer

Log in or Sign up to answer