Forums

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

make an action only if the lookup issue does not return any results

Mélanie Liguet
Contributor
March 12, 2025

Hi, 

I want to make an automation that edits the linked issue to done if and only if all the issues linked by the "requires" relation are done

So, in automation, I made a lookupissue with this query 

issue in linkedIssues("{{parentBundle}}", requires) ans status != done

 

then, i try to analyse the smartvalue.
I tests with 

{{lookupObjects.isEmpty}} = true
{{lookupObjects.size}} = null, 
{{lookupObjects.size}} = 0...

but nothing works

 

Is it possible to make an action only if the lookup issue does not return any results?

 

Capture d’écran 2025-03-12 170419.png

1 answer

1 accepted

2 votes
Answer accepted
Trudy Claspill
Community Champion
March 12, 2025

Hello @Mélanie Liguet 

To check the count of issues returned by a Lookup Issues action you need to use the smart value

{{lookupIssues.size}}

However, it is not clear to me that you have a valid JQL for the Lookup Issues action within the branch. Can you share the details of the For Each Smart Value step. And what is the purpose/use for the Variable you are creating named parentBundleKey?

Mélanie Liguet
Contributor
March 12, 2025

Hi, 

This isn't easy to explain.

I have cards at the subtask level, but they are linked by "requires" links in one direction and "is reqired by" links in the other. This allows me to simulate an additional hierarchical level.

If a card is set to done, I check if it has an "is required by" link to find the subtask to which it is attached. This is the issue key that I store in the "parentbundlekey" variable.

Then I use this variable to analyze all the cards linked by the "requires" link.

If all the attached cards are done, then I must set "parentbundlekey" to done.

Trudy Claspill
Community Champion
March 12, 2025

If you change the comparison for the lookup issues result as I recommended does your rule work as you intend?

Mélanie Liguet
Contributor
March 13, 2025

Thank you for your help.
I felt like I was close. It works.
Thank you.

Like Dave Liao likes this
Trudy Claspill
Community Champion
March 13, 2025

I'm glad I could help!

If your problem has been resolved with the help of my responses, please consider clicking on the Accept Answer button above my response to mark your Question as Solved.

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events