[Bug 16994] New: Import and export MARC modification templates
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 Bug ID: 16994 Summary: Import and export MARC modification templates Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Tools Assignee: gmcharlt@gmail.com Reporter: oleonard@myacpl.org QA Contact: testopia@bugs.koha-community.org Configuring a complicated MARC modification template can be a tedious job, so it would be nice to be able to import and export them the way we can with MARC frameworks. This would also facilitate sharing between libraries. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |magnus@libriotech.no See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=17047 --- Comment #1 from Magnus Enger <magnus@libriotech.no> --- Maybe something for Mana? See bug 17047. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 Marjorie Barry-Vila <marjorie.barry-vila@ccsr.qc.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marjorie.barry-vila@ccsr.qc | |.ca -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 Andreas Roussos <arouss1980@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arouss1980@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.poulain@biblibre.com --- Comment #2 from Paul Poulain <paul.poulain@biblibre.com> --- yes, something for mana, for sure ! Mana is now pushed. BibLibre developers have a lot of things pending, but I add this idea in my radar (maybe something for an intern in the future ? ;) ) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 Michelle Carrillo <mcarrillo@roseville.ca.us> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mcarrillo@roseville.ca.us -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 Kelly McElligott <kelly@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kelly@bywatersolutions.com --- Comment #3 from Kelly McElligott <kelly@bywatersolutions.com> --- This would be awesome in Mana! My first thought was exporting - as Owen commented, but Mana would be way easier and cooler. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 Barbara Johnson <barbara.johnson@bedfordtx.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |barbara.johnson@bedfordtx.g | |ov --- Comment #4 from Barbara Johnson <barbara.johnson@bedfordtx.gov> --- I just had an instance where being able to export and import a MARC Modification template would have been helpful. We'd love to have this functionality. And being able to discover templates from other libraries would be great. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 AspenCat Team <aspencatteam@clicweb.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aspencatteam@clicweb.org --- Comment #5 from AspenCat Team <aspencatteam@clicweb.org> --- I like to test our marc modification template in sandbox. If successful and complicated it would be nice to be able to move to production without manually copying each line. I would also like to see a library that we could borrow modification templates. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 helm.consortium@nhs.net changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |helm.consortium@nhs.net -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arthur.suzuki@biblibre.com --- Comment #6 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Created attachment 190560 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190560&action=edit Describes the function -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 --- Comment #7 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Created attachment 190561 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190561&action=edit Bug 16994: Import and export MARC modification templates This patch adds export and import functions to the MarcModificationTemplates tools The different templates can be exported either individually or all of them. On import you can choose to either skip or overwrite existing templates with the same name. Test plan: - create a Marc Modification templates with one field creation action. - click on "Export all" in the menu and save the file on your computer. - add a new action in the template (ie, update field). - click on "Import" in the menu and choose the downloaded file. - by default the import tool doesn't overwrite - there should be a message saying "skipped 1 template" - the template should still have 2 actions. - import the same file again but uncheck the "skip existing template". - this time the template should be back to only one action. - delete the template - import the same file again, the template should be back with a single action. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #8 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- I've provided a first patch with the whole functionality available but it still needs at least proper unit tests to pass the QA. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 --- Comment #9 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Created attachment 190563 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190563&action=edit Bug 16994: Add unit tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 Esther Melander <esther.melander@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |esther.melander@bywatersolu | |tions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190561|0 |1 is obsolete| | Attachment #190563|0 |1 is obsolete| | --- Comment #10 from Roman Dolny <roman.dolny@jezuici.pl> --- Created attachment 190647 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190647&action=edit Bug 16994: Import and export MARC modification templates This patch adds export and import functions to the MarcModificationTemplates tools The different templates can be exported either individually or all of them. On import you can choose to either skip or overwrite existing templates with the same name. Test plan: - create a Marc Modification templates with one field creation action. - click on "Export all" in the menu and save the file on your computer. - add a new action in the template (ie, update field). - click on "Import" in the menu and choose the downloaded file. - by default the import tool doesn't overwrite - there should be a message saying "skipped 1 template" - the template should still have 2 actions. - import the same file again but uncheck the "skip existing template". - this time the template should be back to only one action. - delete the template - import the same file again, the template should be back with a single action. Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 --- Comment #11 from Roman Dolny <roman.dolny@jezuici.pl> --- Created attachment 190648 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190648&action=edit Bug 16994: Add unit tests Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |arthur.suzuki@biblibre.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190647|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190648|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 --- Comment #12 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Created attachment 196097 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196097&action=edit Bug 16994: Import and export MARC modification templates This patch adds export and import functions to the MarcModificationTemplates tools The different templates can be exported either individually or all of them. On import you can choose to either skip or overwrite existing templates with the same name. Test plan: - create a Marc Modification templates with one field creation action. - click on "Export all" in the menu and save the file on your computer. - add a new action in the template (ie, update field). - click on "Import" in the menu and choose the downloaded file. - by default the import tool doesn't overwrite - there should be a message saying "skipped 1 template" - the template should still have 2 actions. - import the same file again but uncheck the "skip existing template". - this time the template should be back to only one action. - delete the template - import the same file again, the template should be back with a single action. Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 --- Comment #13 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Created attachment 196098 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196098&action=edit Bug 16994: Add unit tests Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196097|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196098|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 --- Comment #14 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 196099 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196099&action=edit Bug 16994: Import and export MARC modification templates This patch adds export and import functions to the MarcModificationTemplates tools The different templates can be exported either individually or all of them. On import you can choose to either skip or overwrite existing templates with the same name. Test plan: - create a Marc Modification templates with one field creation action. - click on "Export all" in the menu and save the file on your computer. - add a new action in the template (ie, update field). - click on "Import" in the menu and choose the downloaded file. - by default the import tool doesn't overwrite - there should be a message saying "skipped 1 template" - the template should still have 2 actions. - import the same file again but uncheck the "skip existing template". - this time the template should be back to only one action. - delete the template - import the same file again, the template should be back with a single action. Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 --- Comment #15 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 196100 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196100&action=edit Bug 16994: Add unit tests Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |paul.derscheid@lmscloud.de |y.org | CC| |paul.derscheid@lmscloud.de -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This enhancement brings in release notes| |the possibility for a | |librarian to export a Marc | |modification template in a | |json file. This can serve | |either as a backup or for | |sharing purposes. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Status|Passed QA |Failed QA --- Comment #16 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Running tests (1) * Proving /kohadevbox/koha/t/db_dependent/MarcModificationTemplates.t FAIL # Failed test 'One template overwritten' # at /kohadevbox/koha/t/db_dependent/MarcModificationTemplates.t line 1239. # Looks like you failed 1 test of 12. # Failed test 'Import with skip_existing=0 overwrites existing templates' # at /kohadevbox/koha/t/db_dependent/MarcModificationTemplates.t line 1250. # Failed test 'no warnings' # at /usr/share/perl/5.36/Test/Builder.pm line 193. # There were 1 warning(s) # Previous test 7 'No templates skipped' # Use of uninitialized value in numeric eq (==) at /kohadevbox/koha/t/db_dependent/MarcModificationTemplates.t line 1239. # at /kohadevbox/koha/t/db_dependent/MarcModificationTemplates.t line 1239. # main::__ANON__() called at /usr/share/perl/5.36/Test/Builder.pm line 374 # eval {...} called at /usr/share/perl/5.36/Test/Builder.pm line 374 # Test::Builder::subtest(Test::Builder=HASH(0x55d07d22e2e8), "Import with skip_existing=0 overwrites existing templates", CODE(0x55d083265fb8)) called at /usr/share/perl/5.36/Test/More.pm line 809 # Test::More::subtest("Import with skip_existing=0 overwrites existing templates", CODE(0x55d083265fb8)) called at /kohadevbox/koha/t/db_dependent/MarcModificationTemplates.t line 1250 # # Looks like you failed 2 tests of 134. /kohadevbox/koha/t/db_dependent/MarcModificationTemplates.t .. Dubious, test returned 2 (wstat 512, 0x200) Failed 2/134 subtests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 --- Comment #17 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 197700 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197700&action=edit Bug 16994: (QA follow-up) Align overwrite result key across module, template and tests The import result hash key was inconsistent: the module sets $result->{overwrote}, but the test checked $result->{overwrite} and the template wrapper used import_overwrite. The uninitialized key also triggered a "Use of uninitialized value" warning when no templates were overwritten. - Initialize overwrote => 0 in ImportModificationTemplates result hash - Update test to check $result->{overwrote} - Fix template success-alert wrapper to gate on import_overwrote Test plan: - prove t/db_dependent/MarcModificationTemplates.t - all 134 subtests pass Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |26.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 --- Comment #18 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16994 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Needs documenting --- Comment #19 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- This will not be backported to 25.11.x due to it being deemed an enhancement or a dependancy not being met -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org