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 <chrisc@catalyst.net.z>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2016-04-06 15:59:02 +01:00 committed by Brendan Gallagher
parent 404d9001fe
commit 6d52cd63f3

View file

@ -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",