-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DS-3543 shows pagination bug with withdrawn items #2406
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The total from the "findAll()" rest call can still differ from the from the amount of items that are actually returned.
The query that we execute to retrieve all items right now is:
SELECT uuid FROM item WHERE in_archive=true OR withdrawn=true; (OK)
But the query to retrieve the total count is
SELECT COUNT(*) FROM item;
When there are items in the workflow / workspace the total count will be higher. I think we need a countTotalUnfiltered() method.
good catch @KevinVdV , thanks to check that. I will fix that change the IT to identify this issue (it should be sufficient to add some workspaceitem to the test env). I will ping you once done |
@KevinVdV after further consideration, for consistency reason, I think we should introduce an additional findAllUnfilteredAndInprogress method that really return all the items that should be exposed over the REST endpoint. The inprogress items indeed are exposed on the items endpoint if you know the uuid (and linked from the workspaceitem / workflowitem). |
@abollini I would assume that if e.g. On the other hand, the I must admit that these methods can also get quite confusing when we have:
Although a cleanup of all these names is out of scope for this PR, I would prefer to either:
|
thanks @benbosman for your feedback, I will proceed with the option
The items endpoint is just for administrators and it is convenient for the Integration Tests for sure as "double check" maybe there are maintenance use case that we don't see yet. I will also create a PR to update the contract to make this explicit |
Have you considered the performance of such request, i.e. returning all items? |
This may have been resolved (in a different manner) by #2580, as withdrawn & private items are no longer returned in default searches/counts...they are now a separate search configuration which is only accessible to Admins. |
This PR provides the alternative fix agreed in #2120
The first commit extends the current IT about items pagination to show the bug
https://travis-ci.org/4Science/DSpace/builds/524414847
the second one is the fix