From af63ab0687699808e4069ebafa1adbec268c1be5 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 (cherry picked from commit 6d52cd63f351cd56f36492b80c10c0d8568ef03d) Signed-off-by: Julian Maurice (cherry picked from commit 6ca552c2e86a4459ba8a68903b7ac60c614731af) Signed-off-by: Chris Cormack --- 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 e33b0cbfd9..09f4ed9124 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