Bugzilla – Attachment 61490 Details for
Bug 18139
'Too many checked out' can confuse librarians
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18139 - 'Too many checked out' can confuse librarians
Bug-18139---Too-many-checked-out-can-confuse-libra.patch (text/plain), 6.70 KB, created by
Biblibre Sandboxes
on 2017-03-22 18:09:53 UTC
(
hide
)
Description:
Bug 18139 - 'Too many checked out' can confuse librarians
Filename:
MIME Type:
Creator:
Biblibre Sandboxes
Created:
2017-03-22 18:09:53 UTC
Size:
6.70 KB
patch
obsolete
>From 4bf7758e683411edac1bf9eb960239e464a64feb Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@kylehall.info> >Date: Fri, 17 Feb 2017 10:15:00 -0500 >Subject: [PATCH] Bug 18139 - 'Too many checked out' can confuse librarians > >The too many checked out message can be very confusing for librarians >when the limit specified is more or less than the number of checkouts >the patron already has. We should make it clear to the librarian that >his is only counting certain types of checkouts by giving them the >issuing rule criteria used. > >Test Plan: >1) Apply this patch >2) Try to check out more items than the circ rules allow for > regular and on-site checkouts > >Signed-off-by: Eric Gosselin <eric.gosselin@inlibro.com> >--- > C4/Circulation.pm | 18 +++++++--- > .../prog/en/modules/circ/circulation.tt | 41 ++++++++++++++++++++++ > 2 files changed, 54 insertions(+), 5 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index af5acce..1ce6cb8 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -477,6 +477,7 @@ sub TooMany { > reason => 'TOO_MANY_ONSITE_CHECKOUTS', > count => $onsite_checkout_count, > max_allowed => $max_onsite_checkouts_allowed, >+ issuing_rule => $issuing_rule, > } > } > } >@@ -487,6 +488,7 @@ sub TooMany { > reason => 'TOO_MANY_CHECKOUTS', > count => $checkout_count, > max_allowed => $max_checkouts_allowed, >+ issuing_rule => $issuing_rule, > }; > } > } elsif ( not $onsite_checkout ) { >@@ -495,6 +497,7 @@ sub TooMany { > reason => 'TOO_MANY_CHECKOUTS', > count => $checkout_count - $onsite_checkout_count, > max_allowed => $max_checkouts_allowed, >+ issuing_rule => $issuing_rule, > }; > } > } >@@ -531,6 +534,7 @@ sub TooMany { > reason => 'TOO_MANY_ONSITE_CHECKOUTS', > count => $onsite_checkout_count, > max_allowed => $max_onsite_checkouts_allowed, >+ issuing_rule => $issuing_rule, > } > } > } >@@ -541,6 +545,7 @@ sub TooMany { > reason => 'TOO_MANY_CHECKOUTS', > count => $checkout_count, > max_allowed => $max_checkouts_allowed, >+ issuing_rule => $issuing_rule, > }; > } > } elsif ( not $onsite_checkout ) { >@@ -549,13 +554,14 @@ sub TooMany { > reason => 'TOO_MANY_CHECKOUTS', > count => $checkout_count - $onsite_checkout_count, > max_allowed => $max_checkouts_allowed, >+ issuing_rule => $issuing_rule, > }; > } > } > } > > if ( not defined( $issuing_rule ) and not defined($branch_borrower_circ_rule->{maxissueqty}) ) { >- return { reason => 'NO_RULE_DEFINED', max_allowed => 0 }; >+ return { reason => 'NO_RULE_DEFINED', max_allowed => 0, issuing_rule => $issuing_rule }; > } > > # OK, the patron can issue !!! >@@ -842,13 +848,15 @@ sub CanBookBeIssued { > $needsconfirmation{PATRON_CANT} = 1; > } > if ( C4::Context->preference("AllowTooManyOverride") ) { >- $needsconfirmation{TOO_MANY} = $toomany->{reason}; >+ $needsconfirmation{TOO_MANY} = $toomany->{reason}; > $needsconfirmation{current_loan_count} = $toomany->{count}; >- $needsconfirmation{max_loans_allowed} = $toomany->{max_allowed}; >+ $needsconfirmation{max_loans_allowed} = $toomany->{max_allowed}; >+ $needsconfirmation{issuing_rule} = $toomany->{issuing_rule}; > } else { >- $issuingimpossible{TOO_MANY} = $toomany->{reason}; >+ $issuingimpossible{TOO_MANY} = $toomany->{reason}; > $issuingimpossible{current_loan_count} = $toomany->{count}; >- $issuingimpossible{max_loans_allowed} = $toomany->{max_allowed}; >+ $issuingimpossible{max_loans_allowed} = $toomany->{max_allowed}; >+ $issuingimpossible{issuing_rule} = $toomany->{issuing_rule}; > } > } > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index 114f2e7..80e35ce 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -230,10 +230,18 @@ $(document).ready(function() { > > [% IF TOO_MANY and TOO_MANY == 'TOO_MANY_CHECKOUTS' %] > <li>Too many checked out. [% current_loan_count %] checked out, only [% max_loans_allowed %] are allowed.</li> >+ <li> >+ Maximum checkouts calculated from the circulation rule for >+ [% INCLUDE issuing_rule_criteria %] >+ </li> > [% END %] > > [% IF TOO_MANY and TOO_MANY == 'TOO_MANY_ONSITE_CHECKOUTS' %] > <li>Too many on-site checked out. [% current_loan_count %] on-site checked out, only [% max_loans_allowed %] are allowed.</li> >+ <li> >+ Maximum on-site checkouts calculated from the circulation rule for >+ [% INCLUDE issuing_rule_criteria %] >+ </li> > [% END %] > > [% IF ( BORRNOTSAMEBRANCH ) %] >@@ -513,6 +521,10 @@ $(document).ready(function() { > > [% IF ( TOO_MANY ) %] > <li>Too many checked out. [% current_loan_count %] checked out, only [% max_loans_allowed %] are allowed.</li> >+ <li> >+ Maximum checkouts calculated from the circulation rule for >+ [% INCLUDE issuing_rule_criteria %] >+ </li> > [% END %] > > [% IF ( ITEMNOTSAMEBRANCH ) %] >@@ -1039,3 +1051,32 @@ No patron matched <span class="ex">[% message | html %]</span> > </div> > </div> > [% INCLUDE 'intranet-bottom.inc' %] >+ >+[% BLOCK issuing_rule_criteria %] >+ <ul> >+ <li> >+ Item type: >+ [% IF issuing_rule.itemtype == '*' %] >+ <i>All</i> >+ [% ELSE %] >+ [% ItemTypes.GetDescription( issuing_rule.itemtype ) %] >+ [% END %] >+ </li> >+ <li> >+ Patron category: >+ [% IF issuing_rule.categorycode == '*' %] >+ <i>All</i> >+ [% ELSE %] >+ [% Categories.GetName( issuing_rule.categorycode ) %] >+ [% END %] >+ </li> >+ <li> >+ Library: >+ [% IF issuing_rule.branchcode == '*' %] >+ <i>All libraries</i> >+ [% ELSE %] >+ [% Branches.GetName( issuing_rule.branchcode ) %] >+ [% END %] >+ </li> >+ </ul> >+[% END %] >-- >2.7.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 18139
:
60427
|
60428
|
60429
|
61489
|
61490
|
61491
|
61541
|
61542
|
61543
|
61663
|
159307
|
159308
|
159522
|
159523
|
159728
|
159729
|
159740
|
159904
|
159905
|
159906
|
159907