Bugzilla – Attachment 19612 Details for
Bug 9576
Enable or disable issue limit confirmation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 9576 - Enable or disable issue limit confirmation
PASSED-QA-Bug-9576---Enable-or-disable-issue-limit.patch (text/plain), 5.99 KB, created by
Katrin Fischer
on 2013-07-12 22:51:33 UTC
(
hide
)
Description:
[PASSED QA] Bug 9576 - Enable or disable issue limit confirmation
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2013-07-12 22:51:33 UTC
Size:
5.99 KB
patch
obsolete
>From c5a66001edb522ed5542f54c31514e308c60b551 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 11 Feb 2013 08:27:05 -0500 >Subject: [PATCH] [PASSED QA] Bug 9576 - Enable or disable issue limit > confirmation > >Adds a new system preference AllowTooManyOverride to control whether >a librarian can override the 'Too many checked out' message which is >currently always overridable. > >Test Plan: >1) Apply patch >2) Run updatedatabase.pl >3) Attempt to check out 1 more item to a patron than the max issues >4) You should be allowed to override by default ( current behavior ) >5) Set AllowTooManyOverride to "Don't allow" >6) Repeat step 3 >7) You should be blocked from being able to issue the item > >Signed-off-by: Srdjan <srdjan@catalyst.net.nz> >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> > >The new system preference is activated by default, which mean there >will be know change in behaviour on update. > >The system preference is correctly added to the database and .pref >files. > >Test plan and QA script passes. >--- > C4/Circulation.pm | 12 +++++++++--- > installer/data/mysql/sysprefs.sql | 1 + > installer/data/mysql/updatedatabase.pl | 8 +++++++- > .../en/modules/admin/preferences/circulation.pref | 6 ++++++ > .../prog/en/modules/circ/circulation.tt | 4 ++++ > 5 files changed, 27 insertions(+), 4 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 30cbe2f..6fd3bd0 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -826,9 +826,15 @@ sub CanBookBeIssued { > $needsconfirmation{PATRON_CANT} = 1; > } else { > if($max_loans_allowed){ >- $needsconfirmation{TOO_MANY} = 1; >- $needsconfirmation{current_loan_count} = $current_loan_count; >- $needsconfirmation{max_loans_allowed} = $max_loans_allowed; >+ if ( C4::Context->preference("AllowTooManyOverride") ) { >+ $needsconfirmation{TOO_MANY} = 1; >+ $needsconfirmation{current_loan_count} = $current_loan_count; >+ $needsconfirmation{max_loans_allowed} = $max_loans_allowed; >+ } else { >+ $issuingimpossible{TOO_MANY} = 1; >+ $issuingimpossible{current_loan_count} = $current_loan_count; >+ $issuingimpossible{max_loans_allowed} = $max_loans_allowed; >+ } > } > } > >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 0a3f20f..e3c0f3d 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -428,3 +428,4 @@ INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) V > INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHoldNotes',0,'Show hold notes on OPAC','','YesNo'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('CalculateFinesOnReturn','1','Switch to control if overdue fines are calculated on return or not', '', 'YesNo'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('AcqWarnOnDuplicateInvoice','0','Warn librarians when they try to create a duplicate invoice', '', 'YesNo'); >+INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('AllowTooManyOverride', '1', 'If on, allow staff to override and check out items when the patron has reached the maximum number of allowed checkouts', '', 'YesNo'); >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 1f7b491..1b88ccc 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -7036,7 +7036,6 @@ if ( CheckVersion($DBversion) ) { > SetVersion($DBversion); > } > >- > $DBversion = "3.13.00.012"; > if ( CheckVersion($DBversion) ) { > $dbh->do("ALTER TABLE issuingrules MODIFY COLUMN overduefinescap decimal(28,6) DEFAULT NULL;"); >@@ -7044,6 +7043,13 @@ if ( CheckVersion($DBversion) ) { > SetVersion($DBversion); > } > >+$DBversion ="3.13.00.XXX"; >+if ( CheckVersion($DBversion) ) { >+ $dbh->do("INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('AllowTooManyOverride', '1', 'If on, allow staff to override and check out items when the patron has reached the maximum number of allowed checkouts', '', 'YesNo');"); >+ print "Upgrade to $DBversion done (Bug 9576 - Enable or disable issue limit confirmation)\n"; >+ SetVersion($DBversion); >+} >+ > =head1 FUNCTIONS > > =head2 TableExists($table) >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >index 64cf338..c286ed1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >@@ -126,6 +126,12 @@ Circulation: > > Checkout Policy: > - >+ - pref: AllowTooManyOverride >+ choices: >+ yes: Allow >+ no: "Don't allow" >+ - staff to override and check out items when the patron has reached the maximum number of allowed checkouts. >+ - > - pref: AllowNotForLoanOverride > choices: > yes: Allow >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 95252e7..c243487 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -520,6 +520,10 @@ function validate1(date) { > <li>Patron's card is expired</li> > [% END %] > >+ [% IF ( TOO_MANY ) %] >+ <li>Too many checked out. [% current_loan_count %] checked out, only [% max_loans_allowed %] are allowed.</li> >+ [% END %] >+ > [% IF ( ITEMNOTSAMEBRANCH ) %] > <li>This item belongs to [% itemhomebranch %] and cannot be issued from this location.</li> > [% END %] >-- >1.7.9.5
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 9576
:
15236
|
16272
|
18658
|
18722
|
19612
|
19613