Forums

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

Is lookupObjects capped at 100??

Ste404
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.
January 30, 2023

I was trying to display some summary information from Assets but it seems the lookupObject size is maxing out at 100?

Does anyone know if this is correct, can it be changed as it really puts a dent in trying to summarise some information from Assets?

Thanks

1 answer

0 votes
Mikael Sandberg
Community Champion
January 30, 2023

Yes, like lookup issues, lookup object is only returning up to the first 100 objects that is searched.

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.
January 30, 2023

Hi @Ste404 

Yes, and to Mikael's answer...

Depending upon what information you need, a couple of work-arounds would be to:

  • use narrower criteria for the lookup to report in sections
  • if you only need counts...using a web request in the rule call the REST API with JQL for a search and note the maximum count in the response

Kind regards,
Bill

Like Mikael Sandberg likes this
Ste404
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.
January 30, 2023

I can't narrow it down as there are thousands of records and the return is pretty high.

Do you have an example of what to do with the REST API?

The JQL is pretty basic for these  (for example)

"Encrypted" = "FALSE"

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.
January 30, 2023
Ste404
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.
January 30, 2023

Am I still not going to be caught out by the 100 record limit for the lookupObjects.

All I am trying to do is come up with a count.. i.e. lookupObject.size, which is always 100?

 

The lookupObject gets the array from Assets, doesn't that mean the REST side of things is still only working with the capped records?

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.
January 31, 2023

Correct, and...the REST API call will be limited and require paging to see the details.  However if you only need counts one call should provide the counts in the "total" field of the response.

Ste404
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.
January 31, 2023

hmmm ok, this is heading to the too hard basket for now.

Ste404
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.
June 18, 2023

@Bill Sheboy   Decided to come back to this as I just keep coming up against a wall when I want to get information from Assets.

In you comment you said paging to see the details, will that allow more than the 100 records to be displayed or just paging will loop through to come up with the 100 (obviously I am not at all sure about paging :) )

 

Also, you mentioned about the counts in the total field can show than the 100 cap, do you have an example of how that would hang together in an automation.  

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.
June 19, 2023

If you took at the references for the REST API, you will see the startAt parameter, which is used to iterate through pages.

The number of your expected items could determine your approach, as you could assume a maximum and hardcode each chunk.  Doing this dynamically for an unknown number of asset records may not be possible with one rule at this time.

Ste404
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.
June 19, 2023

ok thanks, that sort of confirmed what I was thinking.  Based on the startAt I was unsure how I could smartly increment that until the end of the number of items.

It isn't a case, it is a matter of just starting the next one with a higher 'startAt' number.

 

cheers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events