#lookupIssues - Is there any way to get more than 100 as a result?

Jose Ariel Laureano Ramirez August 16, 2021

I'm working with a large number of incidents that I'd like to send via email and I'm currently using #lookupIssues and it works perfectly, the only issue is that it only returns 100 items.

Any ideas???

1 answer

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 17, 2021

Hi @Jose Ariel Laureano Ramirez 

Short answer: no.

Even though Lookup Issues returns a limited set of fields from issues, automation rules are limited to the number of issues returned/impacted...most likely for performance reasons and accuracy (data could become out of date by the time the rule finished otherwise).

What problem are you trying to solve my sending all of those issues in one email?  Describing that may help the community offer you alternative ideas to the big batch of issues.  Thanks!

Best regards,
Bill

Jose Ariel Laureano Ramirez August 17, 2021

Thanks @Bill Sheboy 

 

Well I want to send via email a weekly report with a group of tickets based on the result set of a query but the amount of tickets is over 100, lets say around 200. The automation works perfectly but the issue is that it only send 100 items or less. 

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 17, 2021

Thank you for explaining further. 

Possible work-arounds are to:

  • find ways to identify sub-sets of the results, and use multiple Lookup Issues JQL calls to pull the results in chunks
  • use the REST API to get the count of issues, sent the report, and conditionally add a statement and filter to the email: "There are more than 100 issues, and only the first 100 are shown.  Please check this filter to see the remaining issues: <filter link>"
  • investigate marketplace addon reports which are not limited by 100 issues
Jose Ariel Laureano Ramirez August 17, 2021

Thanks @Bill Sheboy 

Like Bill Sheboy likes this
Chris Carpenter April 7, 2022

Hey @Bill Sheboy - just found your note here while im trying to solve a kind of related issue

Im putting together an automation for jira rule that spits out a bunch of information into slack at the end of a sprint. Everything is working fine except for one part. I am trying to run a lookup that just grabs all the bugs in our backlog, and im then creating a {{lookupIssues.size}} variable to store that number so I can use it in the slack post.

There are more then 100 bugs, but like the issue here, we're capped at 100 issues in a lookup. I dont have much experience using the REST API like you mentioned here, but I was wondering if you knew if it was possible or not - and if so, would you happen to have any resources handy that you could link so I can get this rule up and running?

Thanks in advance!

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 7, 2022

Hi @Chris Carpenter 

For more than 100 issues, you are going to want to use the REST API rather than Lookup Issues, perhaps calling the search function with JQL and only look at the "total" count in the response to get the number you need.

Here is a how-to article for calling the REST API from an automation rule: https://community.atlassian.com/t5/Jira-articles/Automation-for-Jira-Send-web-request-using-Jira-REST-API/ba-p/1443828

And here is the REST API method for the search function: https://docs.atlassian.com/software/jira/docs/api/REST/1000.824.0/#api/2/search-search

For a faster response/smaller dataset return, I recommend only returning the minimum number of fields to get your count, perhaps like this (substituting in your URL and project name):

yourJiraUrl/rest/api/2/search?jql=project%3DmyProjectName&fields=key

 

Kind regards,
Bill

Like Chris Carpenter likes this
Chris Carpenter April 8, 2022

Awesome, thanks @Bill Sheboy Ill probably have a bunch of follow up questions as I dig into this. Hope you dont mind :P

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 8, 2022

No problem, Chris...and...I recommend creating a new question and linking back to this thread for context.  That will ensure the most number of community members see the new thread to offer insights and see solutions.  Thanks!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events