Bugzilla – Attachment 176331 Details for
Bug 34068
Dropdown selector when changing pickup library should not depend on RESTdefaultPageSize
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34068: Fix pagination for hold pickup locations
Bug-34068-Fix-pagination-for-hold-pickup-locations.patch (text/plain), 2.06 KB, created by
Pedro Amorim
on 2025-01-10 13:58:24 UTC
(
hide
)
Description:
Bug 34068: Fix pagination for hold pickup locations
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2025-01-10 13:58:24 UTC
Size:
2.06 KB
patch
obsolete
>From 52a3d62d2ef29fd933adc8d2fddb46df0a397b3f Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Thu, 26 Sep 2024 12:39:58 +0000 >Subject: [PATCH] Bug 34068: Fix pagination for hold pickup locations > >This patch addresses an issue where pagination filters are set incorrectly for the pickup locations endpoint. Only the final page is returned rather than the expected full list of results > >Test plan: >1) In KTD, set the syspref RESTdefaultPageSize to 5 >2) Set AllowHoldPolicyOverride to Allow >3) Create a hold on an item for a patron >4) Navigate to the patron's page and click on the holds tab >5) Click the dropdown in pickup locations >6) There will be two results, repeated three times >7) Apply patch and restart_all >8) Repeat step 5, there should now be a full list of 12 libraries > >Co-authored-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> > >Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com> >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> >--- > Koha/REST/V1/Holds.pm | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/Koha/REST/V1/Holds.pm b/Koha/REST/V1/Holds.pm >index 13f24b86f82..c703aba0b53 100644 >--- a/Koha/REST/V1/Holds.pm >+++ b/Koha/REST/V1/Holds.pm >@@ -462,11 +462,12 @@ sub pickup_locations { > $ps_set = $hold->biblio->pickup_locations( { patron => $hold->patron } ); > } > >- my $pickup_locations = $c->objects->search( $ps_set ); >+ my $pickup_locations; > my @response = (); > > if ( C4::Context->preference('AllowHoldPolicyOverride') ) { > >+ $pickup_locations = $ps_set->as_list; > my $libraries_rs = Koha::Libraries->search( { pickup_location => 1 } ); > my $libraries = $c->objects->search($libraries_rs); > >@@ -487,6 +488,7 @@ sub pickup_locations { > ); > } > >+ $pickup_locations = $c->objects->search( $ps_set ); > @response = map { $_->{needs_override} = Mojo::JSON->false; $_; } @{$pickup_locations}; > > return $c->render( >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34068
:
152486
|
171964
|
171969
|
171970
|
174071
|
174072
|
174106
|
176110
|
176111
|
176112
|
176113
| 176331 |
176332
|
176333
|
176334