We are using several plugins to do the same. See marc21_field_040c and 040d. There must be even some more: 003. Seems not to be used at unimarc side.
Created attachment 40943 [details] [review] Bug 14199: Unify marc orgcode plugins, not overwriting existing values This patch copies code from marc21_field_003.pl to create marc21_orgcode.pl for more generic use. Other fields like 040c or 040d should use it too. Note: The plugin is used for authorities too (003, 040a). One behaviour change is added: If the corresponding field is already filled, it will not be overwritten. In the unit test marc21_orgcode already replaces marc21_field_003. Test plan: [1] Attach plugin marc21_orgcode to a field (e.g. 003) and test it in the MARC editor of Cataloguing or Authorities. [2] Check if a value is not overwritten any more. [3] Run unit test t/db_dependent/FrameworkPlugin.t; don't be distracted by the noisy warnings of marc21_field_007.pl. They will be addressed on another report.
Created attachment 40944 [details] [review] Bug 14199: Modify webinstaller sql files for marc21_orgcode plugin This patch updates the sql installer files for new installations. Occurrences to the three plugins marc21_field_003, 040c and 040d are replaced by marc21_orgcode.pl. This has been generated by one sed statement. Test plan: [1] Run a new installation or run some of the changed sql files manually. [2] Verify that marc21_orgcode is linked to fields previously linked to the three old plugins. [3] Do a git grep on the three plugin file names. No occurrences expected. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Have tested the three english sql files: authorities_normal_marc21.sql: 18 rows with marc21_orgcode (003 and 040a for 9 auth codes) marc21_framework_DEFAULT.sql: 1 row with marc21_orgcode (003) -- this patch does not add them to 040c or 040d; no behavior change.. marc21_simple_bib_frameworks.sql: 8 rows (003 for 8 frameworks)
Created attachment 40945 [details] [review] Bug 14199: Database revision for marc21_orgcode.pl This patch adds the dbrev in atomicupdate, updating the marc structure for existing installations. (New installation in previous patch.) And it removes the obsolete plugin files. Test plan: Run upgrade. Verify that new plugin is linked (for bib and auth). Check plugin in editor.
Created attachment 42513 [details] [review] Bug 14199: Modify webinstaller sql files for marc21_orgcode plugin This patch updates the sql installer files for new installations. Occurrences to the three plugins marc21_field_003, 040c and 040d are replaced by marc21_orgcode.pl. This has been generated by one sed statement. Test plan: [1] Run a new installation or run some of the changed sql files manually. [2] Verify that marc21_orgcode is linked to fields previously linked to the three old plugins. [3] Do a git grep on the three plugin file names. No occurrences expected. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Have tested the three english sql files: authorities_normal_marc21.sql: 18 rows with marc21_orgcode (003 and 040a for 9 auth codes) marc21_framework_DEFAULT.sql: 1 row with marc21_orgcode (003) -- this patch does not add them to 040c or 040d; no behavior change.. marc21_simple_bib_frameworks.sql: 8 rows (003 for 8 frameworks)
Created attachment 42514 [details] [review] Bug 14199: Database revision for marc21_orgcode.pl This patch adds the dbrev in atomicupdate, updating the marc structure for existing installations. (New installation in previous patch.) And it removes the obsolete plugin files. Test plan: Run upgrade. Verify that new plugin is linked (for bib and auth). Check plugin in editor.
Rebased. File marc21_simple_bib_frameworks.sql is no longer touched. Hope this attracts some more attention than thus far ;)
Created attachment 44019 [details] [review] [SIGNED-OFF] Bug 14199: Unify marc orgcode plugins, not overwriting existing values This patch copies code from marc21_field_003.pl to create marc21_orgcode.pl for more generic use. Other fields like 040c or 040d should use it too. Note: The plugin is used for authorities too (003, 040a). One behaviour change is added: If the corresponding field is already filled, it will not be overwritten. In the unit test marc21_orgcode already replaces marc21_field_003. Test plan: [1] Attach plugin marc21_orgcode to a field (e.g. 003) and test it in the MARC editor of Cataloguing or Authorities. [2] Check if a value is not overwritten any more. [3] Run unit test t/db_dependent/FrameworkPlugin.t; don't be distracted by the noisy warnings of marc21_field_007.pl. They will be addressed on another report. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Created attachment 44020 [details] [review] [SIGNED-OFF] Bug 14199: Modify webinstaller sql files for marc21_orgcode plugin This patch updates the sql installer files for new installations. Occurrences to the three plugins marc21_field_003, 040c and 040d are replaced by marc21_orgcode.pl. This has been generated by one sed statement. Test plan: [1] Run a new installation or run some of the changed sql files manually. [2] Verify that marc21_orgcode is linked to fields previously linked to the three old plugins. [3] Do a git grep on the three plugin file names. No occurrences expected. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Have tested the three english sql files: authorities_normal_marc21.sql: 18 rows with marc21_orgcode (003 and 040a for 9 auth codes) marc21_framework_DEFAULT.sql: 1 row with marc21_orgcode (003) -- this patch does not add them to 040c or 040d; no behavior change.. marc21_simple_bib_frameworks.sql: 8 rows (003 for 8 frameworks) Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Created attachment 44021 [details] [review] [SIGNED-OFF] Bug 14199: Database revision for marc21_orgcode.pl This patch adds the dbrev in atomicupdate, updating the marc structure for existing installations. (New installation in previous patch.) And it removes the obsolete plugin files. Test plan: Run upgrade. Verify that new plugin is linked (for bib and auth). Check plugin in editor. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Plugin tested, added to 040a/c/d Test pass No koha-qa errors
Hi Marcel, can you please fix the patches to work with the renamed files from bug 15181?
(In reply to Katrin Fischer from comment #10) > Hi Marcel, > > can you please fix the patches to work with the renamed files from bug 15181? The big change that affects this patch, comes from: b2c302440b7d33e8dc3923b645286a70111dd305 Bug 15097: Update MARC21 de-DE frameworks to Update 21 (September 2015)
How is that? Maybe it's bug 10963?
Ah sorry, missed looking at the second patch - but I think some more frameworks updated since (it-IT?)
Created attachment 46223 [details] [review] Bug 14199: Modify webinstaller sql files for marc21_orgcode plugin This patch updates the sql installer files for new installations. Occurrences to the three plugins marc21_field_003, 040c and 040d are replaced by marc21_orgcode.pl. This has been generated by one sed statement. Test plan: [1] Run a new installation or run some of the changed sql files manually. [2] Verify that marc21_orgcode is linked to fields previously linked to the three old plugins. [3] Do a git grep on the three plugin file names. No occurrences expected. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Have tested the three english sql files: authorities_normal_marc21.sql: 18 rows with marc21_orgcode (003 and 040a for 9 auth codes) marc21_framework_DEFAULT.sql: 1 row with marc21_orgcode (003) -- this patch does not add them to 040c or 040d; no behavior change.. marc21_simple_bib_frameworks.sql: 8 rows (003 for 8 frameworks) Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> The following files do no longer need an adjustment: installer/data/mysql/de-DE/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql installer/data/mysql/es-ES/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql installer/data/mysql/it-IT/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql For details, check Bug 15097: Update MARC21 de-DE frameworks to Update 21. And similar reports for es-ES and it-IT. Verified this change by installing de-DE in the webinstaller. The plugin for field 003 was correctly set to marc21_orgcode.pl.
Created attachment 46851 [details] [review] Bug 14199: Unify marc orgcode plugins, not overwriting existing values This patch copies code from marc21_field_003.pl to create marc21_orgcode.pl for more generic use. Other fields like 040c or 040d should use it too. Note: The plugin is used for authorities too (003, 040a). One behaviour change is added: If the corresponding field is already filled, it will not be overwritten. In the unit test marc21_orgcode already replaces marc21_field_003. Test plan: [1] Attach plugin marc21_orgcode to a field (e.g. 003) and test it in the MARC editor of Cataloguing or Authorities. [2] Check if a value is not overwritten any more. [3] Run unit test t/db_dependent/FrameworkPlugin.t; don't be distracted by the noisy warnings of marc21_field_007.pl. They will be addressed on another report. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 46852 [details] [review] Bug 14199: Database revision for marc21_orgcode.pl This patch adds the dbrev in atomicupdate, updating the marc structure for existing installations. (New installation in previous patch.) And it removes the obsolete plugin files. Test plan: Run upgrade. Verify that new plugin is linked (for bib and auth). Check plugin in editor. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Plugin tested, added to 040a/c/d Test pass No koha-qa errors Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 46853 [details] [review] Bug 14199: Modify webinstaller sql files for marc21_orgcode plugin This patch updates the sql installer files for new installations. Occurrences to the three plugins marc21_field_003, 040c and 040d are replaced by marc21_orgcode.pl. This has been generated by one sed statement. Test plan: [1] Run a new installation or run some of the changed sql files manually. [2] Verify that marc21_orgcode is linked to fields previously linked to the three old plugins. [3] Do a git grep on the three plugin file names. No occurrences expected. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Have tested the three english sql files: authorities_normal_marc21.sql: 18 rows with marc21_orgcode (003 and 040a for 9 auth codes) marc21_framework_DEFAULT.sql: 1 row with marc21_orgcode (003) -- this patch does not add them to 040c or 040d; no behavior change.. marc21_simple_bib_frameworks.sql: 8 rows (003 for 8 frameworks) Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> The following files do no longer need an adjustment: installer/data/mysql/de-DE/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql installer/data/mysql/es-ES/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql installer/data/mysql/it-IT/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql For details, check Bug 15097: Update MARC21 de-DE frameworks to Update 21. And similar reports for es-ES and it-IT. Verified this change by installing de-DE in the webinstaller. The plugin for field 003 was correctly set to marc21_orgcode.pl. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master, thanks Marcel! Should be in Koha 3.24