Bugzilla – Attachment 61910 Details for
Bug 18349
Possibility to checkout/renew bypassing the circ rules using SCO
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18349: If a confirmation is required, consider as blocker
Bug-18349-If-a-confirmation-is-required-consider-a.patch (text/plain), 2.53 KB, created by
Nick Clemens (kidclamp)
on 2017-04-05 16:43:27 UTC
(
hide
)
Description:
Bug 18349: If a confirmation is required, consider as blocker
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2017-04-05 16:43:27 UTC
Size:
2.53 KB
patch
obsolete
>From 575eb38a790926406d29e7b23ae1b0e72694b8b0 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 31 Mar 2017 13:22:05 -0300 >Subject: [PATCH] Bug 18349: If a confirmation is required, consider as blocker > >Only RENEW_ISSUE should not be considered as blocker, others should. >Note that this code is not robust and the whole script as well as the >return of CanBookBeIssued should be rewrittent completely. >We need a small patch to easy backport to stable releases > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > opac/sco/sco-main.pl | 19 ++++++++++++------- > 1 file changed, 12 insertions(+), 7 deletions(-) > >diff --git a/opac/sco/sco-main.pl b/opac/sco/sco-main.pl >index d209150..6518c31 100755 >--- a/opac/sco/sco-main.pl >+++ b/opac/sco/sco-main.pl >@@ -144,16 +144,22 @@ elsif ( $op eq "checkout" ) { > 0, > C4::Context->preference("AllowItemsOnHoldCheckoutSCO") > ); >- $confirm_required = scalar keys %$needconfirm; >+ my $issue_error; >+ if ( $confirm_required = scalar keys %$needconfirm ) { >+ for my $error ( qw( UNKNOWN_BARCODE max_loans_allowed ISSUED_TO_ANOTHER NO_MORE_RENEWALS NOT_FOR_LOAN DEBT WTHDRAWN RESTRICTED RESERVED ITEMNOTSAMEBRANCH EXPIRED DEBARRED CARD_LOST GNA INVALID_DATE UNKNOWN_BARCODE TOO_MANY DEBT_GUARANTEES USERBLOCKEDOVERDUE PATRON_CANT PREVISSUE NOT_FOR_LOAN_FORCING ITEM_LOST) ) { >+ if ( $needconfirm->{$error} ) { >+ $issue_error = $error; >+ $confirmed = 0; >+ last; >+ } >+ } >+ } > > #warn "confirm_required: " . $confirm_required ; > if (scalar keys %$impossible) { > >- # warn "impossible: numkeys: " . scalar (keys(%$impossible)); >- #warn join " ", keys %$impossible; >- my $issue_error = (keys %$impossible)[0]; >+ my $issue_error = (keys %$impossible)[0]; # FIXME This is wrong, we assume only one error and keys are not ordered > >- # FIXME we assume only one error. > $template->param( > impossible => $issue_error, > "circ_error_$issue_error" => 1, >@@ -187,9 +193,8 @@ elsif ( $op eq "checkout" ) { > } > } elsif ( $confirm_required && !$confirmed ) { > #warn "failed confirmation"; >- my $issue_error = (keys %$needconfirm)[0]; > $template->param( >- impossible => (keys %$needconfirm)[0], >+ impossible => 1, > "circ_error_$issue_error" => 1, > hide_main => 1, > ); >-- >2.1.4
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 18349
:
61719
|
61720
|
61755
|
61756
|
61757
|
61908
|
61909
| 61910 |
61911
|
61959