Automation Rule Failing Even Though Condition is Not Met

Damien March 30, 2024

Hey guys,

So I encountered this strange problem. I have a simple automation that runs a JQL on a schedule and if any issues show up, processes them in bulk and emails their assignees with some stuff. The automation is working just fine when the JQL returns issues, but when it doesn't, I get an email that it failed (as per the "Notify on error" setting). The audit log is showing the "Some Errors" status with the following error message:

Some Errors.JPG

Apparently, it is still trying to send the emails, even though there are no issues, produced by the JQL. Since the automation is checking for tickets every day, and tickets will be there, say, 30% of the time, I'd be getting these automation failed messages almost every day. Naturally, I can just make it to not send me emails whenever it fails, but this is more of a workaround, rather than a solution.

Has anyone encountered this?

4 answers

1 accepted

2 votes
Answer accepted
Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 30, 2024

Hi @Damien 

I assume this is DC?

I don't have this issue when I tested this (in Cloud or DC) - it just states "No actions performed"

You could try using a Condition, but not sure if it will work...

  • Condition: Advanced compare condition
    • First Value = {{issue.size}}
    • Condition = does not equal
    • Value = 0

---

If this doesn't work, you might be able to...

  • Use a Lookup Issues action to re-run the JQL
  • Use a similar Condition as above, but use the smart value {{lookupIssues.size}}...
    • First Value = {{lookupIssues.size}}
    • Condition = less than
    • Value = 1

---

Let us know if either of these work!

Ste

Bill Sheboy
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.
March 30, 2024

Hi @Stephen Wright _Elabor8_ 

With the bulk-handling feature of Server / Data Center rules, I believe the smart value is plural: {{issues}}

And so the condition would be on: {{issues.size|0}}

Thanks, and kind regards,
Bill

Like # people like this
Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 30, 2024

Thanks Bill :)

Ste

Like Bill Sheboy likes this
Damien April 2, 2024

I am happy to report that Stephen's suggestion worked perfectly! And, yes, as Bill mentioned, it's {{issues.size}}.

Like # people like this
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 2, 2024

Great!

1 vote
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 30, 2024

Hi Damien,

One way to solve is to create a Condition using JQL right after the scheduled trigger. Use the exact same JQL. I know that is redundant, but now the Condition will fail and the rule will stop processing short of the Send email action. 

0 votes
Bill Sheboy
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.
March 30, 2024

Hi @Damien 

Do you want to still send an email (perhaps with a different message body) when there are no issues, or send no email message?

If you want to send no email message, try the condition suggested by Stephen and John.

If you want a different message, you could use conditional logic within the email body to show different content for the cases: https://confluence.atlassian.com/automation/jira-smart-values-conditional-logic-1081351607.html

Kind regards,
Bill

0 votes
Damien March 30, 2024

@Stephen Wright _Elabor8_, @John Funk , thank you very much for the speedy responses! I'll try your suggestions on Monday :) Meanwhile, I tested the same automation rule without the "Process all issues produced by this trigger in bulk" and got the "No actions performed", so there we have it, it's this option that "messes it up".

Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 30, 2024

Let us know how it goes :)

Ste

Like John Funk likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events