Bugzilla – Attachment 181307 Details for
Bug 9762
Log circulation overrides
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9762: (follow-up) Re-instate bug 37868
Bug-9762-follow-up-Re-instate-bug-37868.patch (text/plain), 3.84 KB, created by
Martin Renvoize (ashimema)
on 2025-04-22 16:50:52 UTC
(
hide
)
Description:
Bug 9762: (follow-up) Re-instate bug 37868
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-04-22 16:50:52 UTC
Size:
3.84 KB
patch
obsolete
>From da8baebf03e07d19d433bae338a9aefdb345946e Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@openfifth.co.uk> >Date: Tue, 22 Apr 2025 17:42:07 +0100 >Subject: [PATCH] Bug 9762: (follow-up) Re-instate bug 37868 > >--- > reserve/request.pl | 51 ++++++++++++++++++++++++++++------------------ > 1 file changed, 31 insertions(+), 20 deletions(-) > >diff --git a/reserve/request.pl b/reserve/request.pl >index 3ec07c9cc97..bf310892733 100755 >--- a/reserve/request.pl >+++ b/reserve/request.pl >@@ -34,7 +34,7 @@ use Date::Calc qw( Date_to_Days ); > use C4::Output qw( output_html_with_http_headers ); > use C4::Auth qw( get_template_and_user ); > use C4::Reserves >- qw( RevertWaitingStatus AlterPriority ToggleLowestPriority ToggleSuspend CanBookBeReserved GetMaxPatronHoldsForRecord CanItemBeReserved IsAvailableForItemLevelRequest ); >+ qw( RevertWaitingStatus AlterPriority ToggleLowestPriority CanBookBeReserved GetMaxPatronHoldsForRecord CanItemBeReserved IsAvailableForItemLevelRequest ); > use C4::Items qw( get_hostitemnumbers_of ); > use C4::Koha qw( getitemtypeimagelocation ); > use C4::Serials qw( CountSubscriptionFromBiblionumber ); >@@ -90,7 +90,8 @@ my $warnings; > my $messages; > my $exceeded_maxreserves; > my $exceeded_holds_per_record; >-my @failed_holds = $input->multi_param('failed_holds'); >+my @failed_holds = $input->multi_param('failed_holds'); >+my $form_submitted = $input->param('form_submitted'); > > my $op = $input->param('op') || q{}; > >@@ -118,10 +119,15 @@ if ( $op eq 'cud-move' ) { > } elsif ( $op eq 'cud-setLowestPriority' ) { > my $reserve_id = $input->param('reserve_id'); > ToggleLowestPriority($reserve_id); >-} elsif ( $op eq 'cud-toggleSuspend' ) { >+} elsif ( $op eq 'cud-suspend' ) { > my $reserve_id = $input->param('reserve_id'); > my $suspend_until = $input->param('suspend_until'); >- ToggleSuspend( $reserve_id, $suspend_until ); >+ my $hold = Koha::Holds->find($reserve_id); >+ $hold->suspend_hold($suspend_until) if $hold; >+} elsif ( $op eq 'cud-unsuspend' ) { >+ my $reserve_id = $input->param('reserve_id'); >+ my $hold = Koha::Holds->find($reserve_id); >+ $hold->resume() if $hold; > } elsif ( $op eq 'cud-cancel_bulk' ) { > my $cancellation_reason = $input->param("cancellation-reason"); > my @hold_ids = split( ',', scalar $input->param("ids") ); >@@ -142,24 +148,29 @@ if ($findborrower) { > $borrowernumber_hold = $patron->borrowernumber if $patron; > } > >-if ($findclub) { >- my $club = Koha::Clubs->find( { name => $findclub } ); >- if ($club) { >- $club_hold = $club->id; >- } else { >- my @clubs = Koha::Clubs->search( >- [ >- { name => { like => '%' . $findclub . '%' } }, >- { description => { like => '%' . $findclub . '%' } } >- ] >- )->as_list; >- if ( scalar @clubs == 1 ) { >- $club_hold = $clubs[0]->id; >- } elsif (@clubs) { >- $template->param( clubs => \@clubs ); >+if ($form_submitted) { >+ if ($findclub) { >+ my $club = Koha::Clubs->find( { name => $findclub } ); >+ if ($club) { >+ $club_hold = $club->id; > } else { >- $messageclub = "'$findclub'"; >+ my @clubs = Koha::Clubs->search( >+ [ >+ { name => { like => '%' . $findclub . '%' } }, >+ { description => { like => '%' . $findclub . '%' } } >+ ] >+ )->as_list; >+ if ( scalar @clubs == 1 ) { >+ $club_hold = $clubs[0]->id; >+ } elsif (@clubs) { >+ $template->param( clubs => \@clubs ); >+ } else { >+ $messageclub = "'$findclub'"; >+ } > } >+ } else { >+ my @clubs = Koha::Clubs->search()->as_list; >+ $template->param( clubs => \@clubs ); > } > } > >-- >2.49.0
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 9762
:
149554
|
156222
|
163847
|
164022
|
164067
|
164068
|
164302
|
164387
|
164426
|
164479
|
164508
|
164509
|
164510
|
164519
|
170271
|
170272
|
170273
|
176742
|
177294
|
177295
|
177296
|
178029
|
178030
|
178031
|
178036
|
181303
|
181304
|
181305
|
181306
|
181307
|
181308
|
181340
|
181341
|
181342
|
181343
|
181344
|
181345
|
181346
|
181357
|
181358
|
181359
|
181360
|
181361
|
181362
|
181363
|
181371
|
181381
|
181390
|
181393
|
181545
|
181546