Bug 37636: Remove sort of pending_checkouts by timestamp

Renewals or automatic renewal attempts can change the timestamp of an issue and cause a sort
on this field to functionally randomize the order of checkouts returned.

Prior to bug 19935 the GetPendingCheckouts routine returned items in issuedate order.

Removing the sort on timestamp will return the previous behaviour and provide a more predictable sorting

To test:
1 - Checkout some items to a patron
2 - Print a checkout slip - items are in the order they were checked out
3 - Renew an item,print the slip again it is now at the top of the list
4 - Apply patch, restart_all
5 - Print slip again - the items are now ordered in the order they were checked out.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Nick Clemens 2024-08-20 13:25:26 +00:00 committed by Katrin Fischer
parent 3b0f4ad5e8
commit c038bbfd0b
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834

View file

@ -1438,7 +1438,6 @@ sub pending_checkouts {
{},
{
order_by => [
{ -desc => 'me.timestamp' },
{ -desc => 'issuedate' },
{ -desc => 'issue_id' }, # Sort by issue_id should be enough
],