How to make a OR condition in Jira Automation

serge calderara
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.
January 21, 2021

Dear all,

I have a case where I need to close different issue related to parent issue when parent goes to a certain status

Let see the issue configuration below as an example

chrome_ca2H8TT0d4.png

As you can see from parent issue above it has 2 linked type referring to different issue.

What I am trying to do is that when parent issue is transitioning to DONE, then I need to transition to COMPLETED all issue which where linked type is "Refer to Incident" and "demands"  

My current rule is as below :

Fe21kq5xoF.png

 

Any idea how can I acomplish this ?
Does the Link type accomplish a AND or OR operation ?
Do I need to add an other step ?

Thanks for clarification

regards

2 answers

2 accepted

1 vote
Answer accepted
Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 21, 2021

Hi @serge calderara ,

alternatively, if you have different workflows and need to distinguish between the final statuses, you can do it like this:

automation.png

I agree with @Dirk Ronsmans , but I've already had this picture prepared, when I found out there's his answer , so I decided to post it instead of throw it away :-)

serge calderara
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.
January 21, 2021

@Hana Kučerová interresting this approach too, I will keep it thanks

By the way, I have heard that in cloud Automation there is a kind of limitation token of number of execution rules.

Is it still the case ?

If yes how do we know when a rule fails becuase of reaching the token limit ?

regards

Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 21, 2021
1 vote
Answer accepted
Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 21, 2021

Hi @serge calderara ,

For me the Link Types there would be all the link types that will match. One link can only have a single link type so adding in all the link types that you need should act like a OR

Something like all issues where link type = demands or refer to incident

I am wondering tho if you even need to do this.

You are

1: trigger it on the parent issue when it goes to Done

2: you then check the project, why not just make a project specific rule

3: For linked issues: select an issue type -> why don't you just set the action to move them to completed under this component?

 

Imo, it will loop through the linked issues and you already check it in the For Linked Issues component.

 

Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 21, 2021

Something like

image.png

Unless I'm completely mistaken and misinterpreting this rule :)

Like Dave Liao likes this
serge calderara
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.
January 21, 2021

Thanks @Dirk Ronsmans , I will give a try and let you know

regards

serge calderara
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.
January 21, 2021

dear @Dirk Ronsmans  my scenario is a bit more complex here is the complete picture :

The trigger issue is as below :

Lf2HDSjZct.png

As you can see the first link type is "is demanded by" which then succeed to transition the incident SD-4508 to completed. Then if I open the SD-4508 it displays as below :

3KRFUN4xMA.png

As you can see from above my goal is to close also the Refer to Incident issue when trigger issue SWD-233 is set to DONE. 

But as you can see it does not work ., status remains WORK IN PROGRESS L2

is below my rule :

E7h0d4ia3S.png

 

Seems that the condition in red square above is not logically apply teh condition.

Any idea ?

regards

Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 21, 2021

so If I'm getting this right you have 3 (or more levels)?

  • Main Root Incidents (which is demanded by)
    • Linked incident (which refer to incidents)
      • some more incidents

 

right?

And instead of having to make separate rules that would trigger on a specific level you are trying to combine them by having the rule trigger multiple times?

If so, make sure to check on your rule that you also have the checkbox enabled on the rule details that it can be triggered by another rule. Otherwise it will just do the intial level main root and demanded by but as the "refer to incidents" arent on the first level it doesn't match there (and if you don't have that checkbox enabled it won't rerun the rule on the "demanded by" incident (so it will just stop after one level)

Like Hana Kučerová likes this
serge calderara
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.
January 21, 2021

correct..

I will give it a try an and let you know.

Do you thing it will be better to have sperate rules  ? if yes how would you split them ?

regards

Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 21, 2021

It's not the most complex rule so one should work too. Could you check first if you have that checkbox enabled to allow one rule to trigger another?

 

image.png

I got a feeling that should make your rule work since it does finish the first level if i'm right?

serge calderara
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.
January 22, 2021

Dear @Dirk Ronsmans in fact it execute only once the For Linked issue Action and I need to execute that part also for incident type

The signification of the check box you mentionned is wierd because it says that it allows other rules to trigger this rule BUT in fact I do not have other rule which trigger that rule...

I  check it and but result is the same it handle only the linked issue of the issue which trig the rule

Parent issue (SHW-233) : trig the rule when set to DONE

         Linked issue type : Demand by => major incident (SD-4508) =Set to COMPLETE

Issue SD-4508

        Linked issue type : Refer to incident=> incident (SD-4505,SD-4506) = Remains open ???

Any idea, does it mean I need to setup a separate rule to handle issue SD-4508

regards

Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 22, 2021

Well it also means the rule can trigger itself again. 
as you have multiple levels that’s why I was thinking about recursion 

serge calderara
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.
January 22, 2021

Yes but if the whole rule was suppose to trigger a second time it will not trig because of the first rule condition which is triggered only if issue transition to DONE, which has been already done, so rule will not trig

cL241uMgo6.png

Any idea how to solve ?

Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 22, 2021

Ah correct, somehow I missed that one.

gimme a couple of hours to rebuild this in my test instance and I'll see what I can come up with :)

serge calderara
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.
January 22, 2021

@Dirk Ronsmans thanks for help

Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 22, 2021

Just so I'm clear we got 2 different issue types here with a separate flow?

  1.  will go to "done"
  2. will go to "completed"

and the done issue has links to a issue that will be "completed"

Those completed issue might again have links to other issue which need to become "completed" 

right?

serge calderara
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.
January 22, 2021

Dear @Dirk Ronsmans 
The firts issue is triggered manually to Done which then start the autommation rule to set to Complete the linked issue of the current issue which trigger the rule.

Then the issue which has been set to Complete ( Linked issue) at step 1 has some other linked issue that need to be set to Complete as well

Hope it is more clear to you

serge calderara
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.
January 25, 2021

@Dirk Ronsmans , did you manage to find something ?

regards

Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 26, 2021

Hey @serge calderara ,

I apologise, I haven't had a chance to work on this yet on my instance.

I do believe it would make more sense to split this in to 2 automations.

  1. When Issue is transitioned to Done, Check the linked issues for the "is demanded by" link and move those to Completed
  2. When issue is moved to "Completed"Check the linked issues for the "Refers to incident" link and move those to Completed too.

For this, make sure to have the checkbox enabled so rules can trigger each other. This would also help if you were to Complete an issue without a MAJ-INC that the refers to incidents would also Complete.

If you make this as a project rule you will have no impact on your execution counter either as those are unlimited.

if you really want to make it as a single rule we'd have to work statusses as triggers and I'd set a IF clause to see if the issue status = Done and an IF Clause to see if the issue status is "Completed". That way you'd split up the rule but within a single rule (if that makes sense).

If you get back to me what your preferred solution would be and give me a day or 2 I should be able to find some time to provide you with screenshots.

serge calderara
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.
January 26, 2021

Hello @Dirk Ronsmans , here is attached a complete overview of the flow to make you better understanding of what I am trying to reach.

You have understand that as we are running on Cloud, rules count execution is an important aspect and we try to optimize the number of rules. Of course in case it is simpler with different rule then no choice but we need to be carefull that rule can be started by any issue before finding an unmatch condition which make it stop

Hoping the file will help:

https://1drv.ms/b/s!AuPzV8ZG3v-2lUtuKHBLxAHRnTn1?e=QeL5U8 

regards

Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 26, 2021

I'll take a look.

Just so you know, project specific rules have unlimited executions. Only Global Rules count toward your execution counter.

Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 29, 2021

Hey @serge calderara ,

I've made a small test in my environment and I think this might work.. or at least as a proof of concept.

Since it is one rule you'll need to put it as a global rule. the rule itself will re-trigger itself too so make sure to put that checkbox.

image.png

 

i've added both transition statusses as the trigger, "completed" and "done" and then in my For linked issues I verify the link type and tell the issue what status to transition too.

Since your issues are in multiple projects you won't be able to do it as project specific rules. However if you specify what link type you want  it to happen for this should be the way to go.

Like Dave Liao likes this

Suggest an answer

Log in or Sign up to answer