Status: Closed (View Workflow)
Affects Version/s: 30.2.4
Template:Standard Bug Write-Up Format customfield_11100 36384
Sprint:CP: sprint 94, CP: sprint 95
Development Team:Core: Platform
Release:Q2 2020 Hot Fix #1
Overview: Given a query that matches >= 1000 rows, it is not possible to use limit and offset together to retrieve rows after the 999th because when limit is greater than 999, the result array is always empty. This makes it impossible to retrieve paged data beyond the 999th record.
Steps to reproduce:
- One way or another, find out the actual number of loans with Status "Open". In our case, it is 6023.
- Make this request to find out the estimated totalRecords count:
Make a note that totalRecords: 1000.
- Attempt to retrieve these 6023 loans by making the 7 times, incrementing offset by 1000 for each iteration:
The first 6 requests return 1000 loans each. The 7th request returns 23 loan objects.
The first request returns 1000. The subsequent requests return  loans.
The same behaviour can be observed in the bugfest tenant as well.
If the offset parameter > than totalRecords, no records are returned. This can be demonstrated by the following steps:
- Make the following request:
This should return loans 1000 loans, but actually returns  – ie no loans past totalRecords.
- Now change the offset to be < totalRecords:
After the last request, we might expect this to return 100 loans, stopping at the totalRecords. However, this actually returns 200 loans – ie the correct result, and 100 loans past the totalRecords.
This issue has also been observed in Inventory, see https://issues.folio.org/browse/CHAL-294