Bugzilla – Attachment 59259 Details for
Bug 17809
Correct some authorised values in fr-FR
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17809: Add upgrade warning messages
Bug-17809-Add-upgrade-warning-messages.patch (text/plain), 2.53 KB, created by
Mark Tompsett
on 2017-01-19 14:46:08 UTC
(
hide
)
Description:
Bug 17809: Add upgrade warning messages
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2017-01-19 14:46:08 UTC
Size:
2.53 KB
patch
obsolete
>From bae5713c44d0e32d1b4d3fe89d525598ae661eb6 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Thu, 19 Jan 2017 09:16:37 -0500 >Subject: [PATCH] Bug 17809: Add upgrade warning messages > >TEST PLAN >--------- >0) backup db >1) drop db and recreate empty >2) run fr-FR web install >3) update systempreferences set Value='16.00003' where variable='Version'; >-- it is currently 16.00004 as of this writing >4) run fr-FR web install > -- bottom of red warnings should be the check messages. >5) perlcritic -1 installer/data/mysql/atomic_update/bug_17809_pretty_red.perl > -- $VERSION message, which we don't care about > -- maybe a message about return value of print ignored. >--- > .../mysql/atomicupdate/bug_17809_pretty_red.perl | 50 ++++++++++++++++++++++ > 1 file changed, 50 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_17809_pretty_red.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_17809_pretty_red.perl b/installer/data/mysql/atomicupdate/bug_17809_pretty_red.perl >new file mode 100755 >index 0000000..957bec7 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_17809_pretty_red.perl >@@ -0,0 +1,50 @@ >+#!/usr/bin/perl -w >+ >+use Modern::Perl; >+use Carp; >+use Koha::Database; >+ >+$DBversion = 'XXX'; >+if ( CheckVersion($DBversion) ) { >+ my $schema = Koha::Database->schema; >+ $schema->storage->txn_begin; >+ >+ my $number_er = $schema->resultset('AuthorisedValue')->search( >+ { >+ authorised_value => 'ER' >+ } >+ )->count; >+ if ( $number_er > 1 ) { >+ carp >+ 'Check for correct Germany [DE] and Eritrea [ER] authorised values.'; >+ } >+ my $number_cc = $schema->resultset('AuthorisedValue')->search( >+ { >+ authorised_value => 'CC' >+ } >+ )->count; >+ if ( $number_cc > 1 ) { >+ carp >+'Check for duplicate authorised values of Cocos (Keeling) Islands [CC].'; >+ } >+ my $number_gq = $schema->resultset('AuthorisedValue')->search( >+ { >+ authorised_value => 'GQ' >+ } >+ )->count; >+ if ( $number_gq > 1 ) { >+ carp 'Check for duplicate authorised values of Equatorial Guinea [GQ].'; >+ } >+ my $number_pk = $schema->resultset('AuthorisedValue')->search( >+ { >+ authorised_value => 'PK' >+ } >+ )->count; >+ if ( $number_pk > 1 ) { >+ carp >+'Check if the authorized value for Poland [PL] matches Pakistan\'s [PK].'; >+ } >+ SetVersion($DBversion); >+ print >+"Upgrade to $DBversion done (Bug 17809 - Correct some authorised values in fr-FR)\n"; >+} >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17809
:
58390
|
58577
|
59259
|
59261
|
59262
|
72099
|
72842
|
72843
|
72844
|
72845
|
73107
|
73108
|
73109
|
73110
|
113304
|
113305
|
114713
|
114758
|
114759
|
114760
|
114792
|
114795
|
114796
|
114797