Bugzilla – Attachment 181358 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: Change how to pass the param
Bug-9762-Change-how-to-pass-the-param.patch (text/plain), 8.05 KB, created by
Martin Renvoize (ashimema)
on 2025-04-23 10:15:29 UTC
(
hide
)
Description:
Bug 9762: Change how to pass the param
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-04-23 10:15:29 UTC
Size:
8.05 KB
patch
obsolete
>From 2377cde280e70f51835b41a48cc922a584042b4b Mon Sep 17 00:00:00 2001 >From: Matthias Le Gac <matthias.le-gac@inlibro.com> >Date: Tue, 2 Apr 2024 16:26:17 -0400 >Subject: [PATCH] Bug 9762: Change how to pass the param > >--- > C4/Circulation.pm | 51 ++++++++++++++++++--------------------------- > circ/circulation.pl | 1 + > 2 files changed, 21 insertions(+), 31 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 3d2fbd387a7..26748dfbc62 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -320,21 +320,6 @@ A recall for this item was found, and the item needs to be transferred to the re > > =cut > >-my $query = CGI->new; >- >-my $stickyduedate = $query->param('stickyduedate'); >-my $duedatespec = $query->param('duedatespec'); >-my $restoreduedatespec = $query->param('restoreduedatespec') || $duedatespec; >-if ( $restoreduedatespec && $restoreduedatespec eq "highholds_empty" ) { >- undef $restoreduedatespec; >-} >-my $issueconfirmed = $query->param('issueconfirmed'); >-my $cancelreserve = $query->param('cancelreserve'); >-my $cancel_recall = $query->param('cancel_recall'); >-my $recall_id = $query->param('recall_id'); >-my $debt_confirmed = $query->param('debt_confirmed') || 0; # Don't show the debt error dialog twice >-my $charges = $query->param('charges') || q{}; >- > sub transferbook { > my $params = shift; > my $tbr = $params->{to_branch}; >@@ -808,6 +793,7 @@ sub CanBookBeIssued { > > my $onsite_checkout = $params->{onsite_checkout} || 0; > my $override_high_holds = $params->{override_high_holds} || 0; >+ my $issueconfirmed = $params->{issueconfirmed} || 0; > > my $item_object = $params->{item}; > if ( !$item_object and $barcode ) { >@@ -833,7 +819,7 @@ sub CanBookBeIssued { > > my $now = dt_from_string(); > my $message; >- my @message; >+ my @message_log; > > $duedate ||= CalcDateDue( $now, $effective_itemtype, $circ_library->branchcode, $patron ); > >@@ -845,7 +831,7 @@ sub CanBookBeIssued { > } else { > $message = "sticky due date is invalid or due date in the past"; > } >- push( @message, "sticky due date is invalid or due date in the past" ); >+ push( @message_log, "sticky due date is invalid or due date in the past" ); > } > > } >@@ -899,7 +885,7 @@ sub CanBookBeIssued { > } else { > $message = "borrower is restricted"; > } >- push( @message, "borrower is restricted" ); >+ push( @message_log, "borrower is restricted" ); > } > } > >@@ -979,7 +965,7 @@ sub CanBookBeIssued { > } else { > $message = "borrower had amend"; > } >- push( @message, "borrower had amend" ); >+ push( @message_log, "borrower had amend" ); > } > } elsif ( $patron_borrowing_status->{noissuescharge}->{overlimit} && !$allowfineoverride ) { > $issuingimpossible{DEBT} = $patron_borrowing_status->{noissuescharge}->{charge}; >@@ -991,7 +977,7 @@ sub CanBookBeIssued { > } else { > $message = "borrower had amend"; > } >- push( @message, "borrower had amend" ); >+ push( @message_log, "borrower had amend" ); > } > } > } >@@ -1079,7 +1065,7 @@ sub CanBookBeIssued { > } else { > $message = "item is checked out for someone else"; > } >- push( @message, "item is checked out for someone else" ); >+ push( @message_log, "item is checked out for someone else" ); > } > } > } >@@ -1114,7 +1100,7 @@ sub CanBookBeIssued { > } else { > $message = "too many checkout"; > } >- push( @message, "too many checkout" ); >+ push( @message_log, "too many checkout" ); > } > } else { > $issuingimpossible{TOO_MANY} = $toomany->{reason}; >@@ -1149,7 +1135,7 @@ sub CanBookBeIssued { > } else { > $message = "item not for loan"; > } >- push( @message, "item not for loan" ); >+ push( @message_log, "item not for loan" ); > } > } > } else { >@@ -1202,7 +1188,7 @@ sub CanBookBeIssued { > } else { > $message = "item lost"; > } >- push( @message, "item lost" ); >+ push( @message_log, "item lost" ); > } > } > if ( C4::Context->preference("IndependentBranches") ) { >@@ -1312,7 +1298,10 @@ sub CanBookBeIssued { > } else { > $message = "item is on reserve and waiting, but has been reserved by some other patron."; > } >- push( @message, "item is on reserve and waiting, but has been reserved by some other patron" ); >+ push( >+ @message_log, >+ "item is on reserve and waiting, but has been reserved by some other patron" >+ ); > } > } elsif ( $restype eq "Reserved" ) { > >@@ -1332,7 +1321,7 @@ sub CanBookBeIssued { > } else { > $message = "item is on reserve for someone else"; > } >- push( @message, "item is on reserve for someone else" ); >+ push( @message_log, "item is on reserve for someone else" ); > } > } elsif ( $restype eq "Transferred" ) { > >@@ -1352,7 +1341,7 @@ sub CanBookBeIssued { > } else { > $message = "item is determined hold being transferred for someone else"; > } >- push( @message, "item is determined hold being transferred for someone else" ); >+ push( @message_log, "item is determined hold being transferred for someone else" ); > } > } elsif ( $restype eq "Processing" ) { > >@@ -1372,7 +1361,7 @@ sub CanBookBeIssued { > } else { > $message = "item is determined hold being processed for someone else"; > } >- push( @message, "item is determined hold being processed for someone else" ); >+ push( @message_log, "item is determined hold being processed for someone else" ); > } > } > } >@@ -1422,7 +1411,7 @@ sub CanBookBeIssued { > } else { > $message = "age restriction"; > } >- push( @message, "age restriction" ); >+ push( @message_log, "age restriction" ); > } else { > $issuingimpossible{AGE_RESTRICTION} = "$agerestriction"; > } >@@ -1492,7 +1481,7 @@ sub CanBookBeIssued { > > my $infos = ( > { >- message => \@message, >+ message => \@message_log, > borrowernumber => $borrower->borrowernumber, > barcode => $barcode, > manager_id => $user, >@@ -1510,7 +1499,7 @@ sub CanBookBeIssued { > ) if C4::Context->preference("IssueLog"); > } > >- return ( \%issuingimpossible, \%needsconfirmation, \%alerts, \%messages, ); >+ return ( \%issuingimpossible, \%needsconfirmation, \%alerts, \%messages, \@message_log ); > } > > =head2 CanBookBeReturned >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 49031332c1e..e9f0f1b3d85 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -349,6 +349,7 @@ if ( @$barcodes && $op eq 'cud-checkout' ) { > { > onsite_checkout => $onsite_checkout, > override_high_holds => $override_high_holds || $override_high_holds_tmp || 0, >+ issueconfirmed => $issueconfirmed, > } > ); > } catch { >-- >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