Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,294,189
Community Members
 
Community Events
165
Community Groups

Automation: How can I check the compare a boolean value of JQL?

I'm using automation to perform a "Lookup Issues" action, and in a subsequent JQL Condition using the result of that "Lookup Issues" action to determine if some other action should be performed.

 

The JQL uses a smart value to represent the result of the "Lookup Issues" action. The result is a list, so I'm using the .isEmpty . If the list is empty, I want to proceed. If not, I want to stop the automation gracefully (i.e. without failure).

and the resulting JQL looks like this

{{lookupIssues.isEmpty}} = true

My automation rule keeps failing, and the audit log says:

"

 JQL Condition
No subsequent actions were performed since JQL condition did not pass due to error running JQL:
Invalid JQL: true = true
"
I'll also include picture to hopefully better illustrate
Screen Shot 2022-05-20 at 7.48.15 AM.png

2 answers

2 accepted

1 vote
Answer accepted

Hi @Brady 

Have you tried an advanced compare condition for this instead of a the JQL one? 

I suspect this is another JQL oddity of both not being an actual SQL and the lookup issues result is not an issue field.

Kind regards,
Bill

Craig Nodwell Community Leader May 20, 2022

The way I'm reading it is ... it's not the JQL but the smartvalue doesn't require the "= True" it already resolves to True.  The error message points to this as well.
{{lookupIssues.IsEmpty}} resolves to True or Null not necessary to include the  = True

Like # people like this

@Craig Nodwell @Bill Sheboy Just want to let you both know that actually in the end a combination of both of your suggestions ended up working.

I needed to use the Smart Value Conditional Logic that Craig linked, but still I must not have been handling the result of this conditional logic correctly with my JQL. Switching from JQL to advanced compare condition enabled me to handle this correctly. Thank you both so much!

Unfortunately since you were both right, I'm not sure who's answer to accept 😬

Like Bill Sheboy likes this

edit: looks like I can accept both. Thanks again for the help!!

1 vote
Answer accepted
Craig Nodwell Community Leader May 20, 2022

Hi @Brady this should help.
Smart Values Conditional Logic 

Craig Nodwell Community Leader May 20, 2022

trueornull.JPG

Like Brady likes this

Hi Craig, Thanks for your suggestion. I truly thought this would be the key, but I'm still having this issue. I've attached the Audit Log. I must be missing something silly here, or maybe this doesn't work in the way I think it does.Screen Shot 2022-05-23 at 11.04.26 AM.png

Craig Nodwell Community Leader May 23, 2022

Hi @Brady so I just found this post.
I think your answer is in here.

advcomp.JPG

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira Software

Upcoming changes to epic fields in company-managed projects

👋 Hi there Jira Community! A few months ago we shared with you plans around renaming epics in your company-managed projects. As part of these changes, we highlighted upcoming changes to epics on...

14,174 views 34 44
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you