Forums

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

JQL query for counting the results obtained

Azahara Camacho April 27, 2021

Hello,

I'm trying to generate a JQL query for automated project rules where the condition is:

-If all the tasks with a special label are in status "DONE", then change the status of another more relevant task.

For my condition, I need to check that the total of issues with status different to DONE is 0. However, I'm not able to generate that query where the total count is 0. Do you know any alternative or option to get that result? 

Thanks a lot,

Azahara.

1 answer

1 accepted

3 votes
Answer accepted
Alex Koxaras _Relational_
Community Champion
April 27, 2021

Hi @Azahara Camacho ,

 

You can use within the automation the lookupissue component, as well as the smart value {{lookupissue.size}} to get the number (count) of the issues found that match the JQL on the lookup component

Screenshot 2021-04-27 155751.png

For example the above rule yield this result:

Screenshot 2021-04-27 155922.png

 

Hope that helps!

Cheers,
Alex

Azahara Camacho April 27, 2021

Thanks a lot @Alex Koxaras _Relational_ !! I didn't know that action and how to use it!
I think that it's enough for my problem! :)

Alex Koxaras _Relational_
Community Champion
April 27, 2021

Nice to know that this might suit your need!

AP November 9, 2022

Had this exact question myself, thank you.

This use within lookupIssues is admittedly absent from https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--lookupIssues--, although this 'size' smart value is listed under comments & attachments.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events