From 6d52cd63f351cd56f36492b80c10c0d8568ef03d Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 6 Apr 2016 15:59:02 +0100 Subject: [PATCH] Bug 12752: FIX letter names in 3.15.00.041 3.15.00.041 was wrong, the name of the letter should not always been the name of the first HOLD notice. PREDUE_PHONE should be updated with the first name of the PREDUE notice, same for OVERDUE_PHONE and OVERDUE Signed-off-by: Chris Cormack Signed-off-by: Marcel de Rooy Signed-off-by: Brendan Gallagher --- installer/data/mysql/updatedatabase.pl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 79380be360..9e6d390649 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8363,10 +8363,9 @@ if ( CheckVersion($DBversion) ) { $DBversion = "3.15.00.041"; if ( CheckVersion($DBversion) ) { - my $name = $dbh->selectcol_arrayref(q| + my ( $name ) = $dbh->selectrow_array(q| SELECT name FROM letter WHERE code="HOLD" |); - $name = $name->[0]; $dbh->do(q| UPDATE letter SET code="HOLD", @@ -8375,6 +8374,9 @@ if ( CheckVersion($DBversion) ) { WHERE code="HOLD_PHONE" |, {}, $name); + ( $name ) = $dbh->selectrow_array(q| + SELECT name FROM letter WHERE code="PREDUE" + |); $dbh->do(q| UPDATE letter SET code="PREDUE", @@ -8383,6 +8385,9 @@ if ( CheckVersion($DBversion) ) { WHERE code="PREDUE_PHONE" |, {}, $name); + ( $name ) = $dbh->selectrow_array(q| + SELECT name FROM letter WHERE code="OVERDUE" + |); $dbh->do(q| UPDATE letter SET code="OVERDUE", -- 2.39.5