From bfcc624a79540467513ddef62e2329d84ab07e45 Mon Sep 17 00:00:00 2001 From: Jacek Ablewicz Date: Wed, 31 Aug 2016 19:46:00 +0200 Subject: [PATCH] Bug 17135 - Maintenance script execution added as part of an atomic DB upgrade MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit (plus warnings for 16.05+ production setups possibly already affected) Signed-off-by: Chris Cormack Signed-off-by: Marcel de Rooy Signed-off-by: Kyle M Hall (cherry picked from commit 3ada0d104de609ae39f58a86d6406b9a1200d758) Signed-off-by: Frédéric Demians --- .../bug_17135-fix_unclosed_nonaccruing_fines.perl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_17135-fix_unclosed_nonaccruing_fines.perl diff --git a/installer/data/mysql/atomicupdate/bug_17135-fix_unclosed_nonaccruing_fines.perl b/installer/data/mysql/atomicupdate/bug_17135-fix_unclosed_nonaccruing_fines.perl new file mode 100644 index 0000000000..f6c28f9da7 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_17135-fix_unclosed_nonaccruing_fines.perl @@ -0,0 +1,14 @@ +$DBversion = '16.06.00.XXX'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + { + print "Attempting upgrade to $DBversion (Bug 17135) ...\n"; + my $maintenance_script = C4::Context->config("intranetdir") . "/misc/maintenance/fix_unclosed_nonaccruing_fines_bug17135.pl"; + system("perl $maintenance_script --confirm"); + print "Upgrade to $DBversion done (Bug 17135 - Fine for the previous overdue may get overwritten by the next one)\n"; + unless ($original_version < TransformToNum("3.23.00.032")) { ## Bug 15675 + print "WARNING: There is a possibility (= just a possibility, it's configuration dependent etc.) that - due to regression introduced by Bug 15675 - some old fine records for overdued items (items which got renewed 1+ time while being overdue) may have been overwritten in your production 16.05+ database. See Bugzilla reports for Bug 14390 and Bug 17135 for more details.\n"; + print "WARNING: Please note that this upgrade does not try to recover such overwitten old fine records (if any) - it's just an follow-up for Bug 14390, it's sole purpose is preventing eventuall further-on overwrites from happening in the future. Optional recovery of the overwritten fines (again, if any) is like, totally outside of the scope of this particular upgrade!\n"; + } + SetVersion ($DBversion); + } +} -- 2.39.5