From 13b609a2405f3782e1d3de43bf366aaa5c7058fc Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 21 Aug 2015 13:34:10 +0200 Subject: [PATCH] Bug 14702: Database revision for GetReserveFee change Content-Type: text/plain; charset=utf-8 This patch adds a warning when upgrading. Test plan: [1] Have a patron category with a hold fee. [2] Run the webinstaller upgrade. Check for the warning. --- installer/data/mysql/atomicupdate/14702_warn.perl | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/14702_warn.perl diff --git a/installer/data/mysql/atomicupdate/14702_warn.perl b/installer/data/mysql/atomicupdate/14702_warn.perl new file mode 100644 index 0000000..14c41c1 --- /dev/null +++ b/installer/data/mysql/atomicupdate/14702_warn.perl @@ -0,0 +1,13 @@ +use C4::Context; + +my $dbh = C4::Context->dbh; +my $a = $dbh->selectall_arrayref( + "SELECT categorycode FROM categories WHERE IFNULL(reservefee,0) <> 0", +); +my @b = map { $_->[0]; } @$a; +if( @$a ) { + print "WARNING !!!\n"; + print "Your library has patron categories with a hold fee.\n"; + print "This version of Koha will start charging these patrons again when placing a hold; a bug in this regard has been solved. See bugzilla report 14702. If you do not want such charges, please check your Patron categories and clear the hold fee.\n"; + print "The relevant categories are: ". ( join ',', @b ). ".\n\n"; +} -- 1.7.10.4