Bug 25389: Correct stray cases of LOST_RETURNED
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 11 May 2020 10:30:35 +0000 (11:30 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 13 May 2020 09:36:10 +0000 (10:36 +0100)
The original DB update for bug 22563 incorrectly mapped CR to
LOST_RETURNED as aposed to LOST_RETURN.  This patch catches such cases
and updates them in the update for bug 23805

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

installer/data/mysql/updatedatabase.pl

index 277d094..e12471c 100755 (executable)
@@ -20011,6 +20011,14 @@ if ( CheckVersion($DBversion) ) {
         );
     }
 
+    # Catch LOST_RETURNED cases from original bug 22563 update
+    $dbh->do(
+        qq{
+            UPDATE accountlines
+            SET accounttype = 'LOST_RETURN'
+            WHERE accounttype = 'LOST_RETURNED'
+    });
+
     # Linking credit_type_code in accountlines to code in account_credit_types
     unless ( foreign_key_exists( 'accountlines', 'accountlines_ibfk_credit_type' ) ) {
         $dbh->do(