I want to get the amount of rows returned from a Jira query, just like the count() function that it is used in SQL.
Hi @Jose Ariel Laureano Ramirez
It's already written in the filter screen (see attached)
thanks @Nir Haimov but I would like to get it via a query so I can say for example: If result is >=100 then do this else do that. Did it make sense to you?
Yes, it make sense, if you are running this JQL via external code, i thought you are asking it via Jira UI.
If you are running a JQL via the API: https://docs.atlassian.com/software/jira/docs/api/REST/8.14.1/#api/2/search
you can use the "total" entity, which tells you the count of records...
Running a JQL statement from the user interface will not show the count when it is above the limit. However if you call the REST API search method for your JQL the "total" field will show the count.
Based upon your other recent questions/posts, I wonder if this is this for an automation rule. If so, you may call the REST API from an automation rule using a web request to get the count. Here is a how-to for making such a call: https://community.atlassian.com/t5/Jira-articles/Automation-for-Jira-Send-web-request-using-Jira-REST-API/ba-p/1443828
Best regards,Bill
It looks like you're new here. Sign in or register to get started.