Created attachment 18378 [details] [review] Bug 10329 - Rename system preference marcflavour to MarcFormat Test Plan: 1) Apply this patch 2) Run updatedatabase.pl 3) View and edit some records 4) You should not see any change in functionality
Created attachment 18380 [details] [review] Bug 10329 - Rename system preference marcflavour to MarcFormat Test Plan: 1) Apply this patch 2) Run updatedatabase.pl 3) View and edit some records 4) You should not see any change in functionality
Impressive. But do a grep with case insensitive please too: my $marcFlavour (no blocker, someone using this variable in bulkmarcimport) More serious: misc/migration_tools/switch_marc21_series_info.pl:if (C4::Context->preference('M ARCFLAVOUR') eq 'UNIMARC') { t/db_dependent/Linker_FirstMatch.t: if (C4::Context->preference('MARCFlavour' ) eq 'UNIMARC') { I have my doubts on your changes in xt/fix-old-fsf-address.exclude Here you are changing folder names. Please check.
Your changes in updatedatabase need correction too (two updates!!) +$DBversion = "3.13.00.XXX"; +if ( CheckVersion($DBversion) ) { + $dbh->do("UPDATE systempreferences SET variable = 'marcflavour' WHERE variable = 'marcflavour'"); + print "Upgrade to $DBversion done (Bug 10329 - Rename system preference marcflavour to marcflavour)\n"; + SetVersion ($DBversion); +} + $DBversion = "3.00.00.009"; if (C4::Context->preference("Version") < TransformToNum($DBversion)) { @@ -3259,7 +3266,7 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { $dbh->do(qq{ ALTER TABLE deleteditems ADD UNIQUE INDEX deleteditemsstocknumberidx (stocknumber); }); - if (C4::Context->preference('marcflavour') eq 'UNIMARC'){ + if (C4::Context->preference('marcflavour') eq 'UNIMARC'){ $dbh->do(qq{ INSERT IGNORE INTO marc_subfield_structure (frameworkcode,tagfield, tagsubfield, tab, repeatable, mandatory,kohafield) SELECT DISTINCT (frameworkcode),995,"j",10,0,0,"items.stocknumber" from biblio_framework ; @@ -6971,6 +6978,13 @@ if(CheckVersion($DBversion)) { SetVersion ($DBversion); } +$DBversion = "3.13.00.XXX"; +if ( CheckVersion($DBversion) ) { + $dbh->do("UPDATE systempreferences SET variable = 'MarcFormat' WHERE variable = 'marcflavour'"); + print "Upgrade to $DBversion done (Bug 10329 - Rename system preference marcflavour to MarcFormat)\n"; + SetVersion ($DBversion); I did get two lines indeed when running this: Upgrade to 3.13.00.XXX done (Bug 10329 - Rename system preference marcflavour to marcflavour) Upgrade to 3.13.00.XXX done (Bug 10329 - Rename system preference marcflavour to MarcFormat)
I'm just about to submit a patch that uses marcflavour... With the renaming of system preferences, I imagine we're going to want to be quite careful with our sign offs and QA for a little while... http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10456
Hi Kyle, I think we both know that your test plan here is a bit too optimistic? ;) marcflavor is used in like a gazillion places to make things work correctly, so there is probably no way at all to test this from the GUI. Marcel++ for thinking about case insensitivity! I am not sure if the win here is worth the risk. The system preference name doesn't contain critical characters like underscores or hyphens and it's only to be set at installation time. Might it be more confusing for developers to change it now that we have been using the term for so long?