From 77ad6b50453d54ec93efe9f272e8fb4dd557c5ce Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Mon, 28 Apr 2025 16:50:41 +0000 Subject: [PATCH] Bug 17338: Fix redirection to correct tabs on waitingreserves.pl To test: 1. Place multiple holds, good to have at least 4, for pickup at a location, I used Nick's handy script 2. Perl misc/cronjobs/holds/build_holds_queue.pl 3. Check in at least 4 items for pickup at one location so they'll be wating 4. Update the expiration date on those holds using ktd --dbshell update reserves set expirationdate = DATE('2024-01-01') where branchcode='CPL'; 5. On Circulation > Holds waiting past their expiration date tab use the cancel button that is in the actions column to cancel a hold The page loads on the Holds waiting tab, although in the url you see /circ/waitingreserves.pl?tab=holdsover 6. APPLY PATCH 7. Try 1 - 5 again, this time after step 5 you should be redirected. 8. Try cancelling holds with a transfer, ensuring you get redirected correctly. --- circ/waitingreserves.pl | 2 +- .../intranet-tmpl/prog/en/modules/circ/waitingreserves.tt | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/circ/waitingreserves.pl b/circ/waitingreserves.pl index b1527c960aa..28981bffcaf 100755 --- a/circ/waitingreserves.pl +++ b/circ/waitingreserves.pl @@ -145,7 +145,7 @@ $template->param( $template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find('FA'); if ( $item && $tab eq 'holdsover' && !@cancel_result ) { - print $input->redirect("/cgi-bin/koha/circ/waitingreserves.pl#holdsover"); + print $input->redirect("/cgi-bin/koha/circ/waitingreserves.pl?tab=holdsover"); } elsif ( $op eq 'cud-cancelall' ) { print $input->redirect("/cgi-bin/koha/circ/waitingreserves.pl"); } else { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt index 44a65e7c971..1de9bd9eaca 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt @@ -56,7 +56,8 @@

This item is on hold for pick-up at [% Branches.GetName( branchcode ) | html %]

[% nextreservtitle | html %] is on hold for [% nextreservsurname | html %], [% nextreservfirstname | html %]. Please retain this item and check it in to process the hold.

-
+ +
@@ -65,7 +66,8 @@

This item is on hold for pick-up at your library

[% nextreservtitle | html %] is on hold for [% nextreservsurname | html %], [% nextreservfirstname | html %]. Please retain this item and check it in to process the hold.

-
+ +
-- 2.39.5