Hello,
I am really hoping someone can help because I am stumped! I was utilizing automation rules to obtain total issue counts from saved JQL search filters and then send those totals to my teams in slack. I had set up these automation rules utilizing the now deprecated search API call in Jira:
/rest/api/2/search
in the automation rule I would then create a variable using the smart value:
{{webResponse.body.total}}
as there was a total issue count returned in the json response. I was then able to send these totals in slack messages to my teams. Unfortunately when the API call was deprecated all my automation rules broke. I have been attempting to find a new API call that will provide the same result. This was the new API call I was able to find that I believe replaced the previous:
/rest/api/3/search/jql
and though it does return the issues from my JQL filter search it does not return the total count within the json response for me to extract as a variable in the automation rule.
As a heads up I have attempted to utilize the variable {{lookupIssues.size}} in the past but have not gotten my desired outcome. The API calls have been the best for my use case up until this point. If anyone has any suggestions on any other API calls or suggestions on if there is anything I could use in the Web request body to have that API call return it I'd really appreciate the help! Thank you so much
When you only need the count, please try the Count Issues Using JQL endpoint:
Kind regards,
Bill
I think @Bill Sheboy answer looks good assuming POST calls are not a problem.
My only comment -- I used to do an issue search (like you) with a maxResults=1 parameter which still gave me the total count. I could then decide how many times I needed to make my API call for the actual issues (total count / maxResults per call) = number of calls to make.
My logic now looks for the "isLast:{true}" value to know when I've made all the calls I wanted. I count the records as I loop and get the total at the end.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.