If you import a MARC framework that has been exported from a previous version of Koha (17.11 and below) results in an empty MARC framework, without any error reporting to the end user. This is because of the added columns in 'marc_tag_structure' (ind1_defaultvalue and ind2_defaultvalue) and the fact that we don't have a fallback behaviour when they are not present on the uploaded file. My opinion is we should check the table header (from CSV or whatever format) and let the DB use the default values if a column is missing. I mark it as Major, because there's no possible data recovery after the failed import.
Created attachment 82224 [details] [review] Bug 21749: Add tests for ImportFramework
Created attachment 82225 [details] [review] Bug 21749: Fix import of CSV biblio framework Bug 9701 added 2 new columns to the table marc_tag_structure which broke the import of biblio frameworks if the CSV file was generated with a previous version. Test plan: - Export a biblio framework from 17.11 - Import it into 18.05+
Created attachment 82234 [details] [review] Bug 21749: Add tests for ImportFramework Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> https://bugs.koha-community.org/show_bug.cgi?id=21740
Created attachment 82235 [details] [review] Bug 21749: Fix import of CSV biblio framework Bug 9701 added 2 new columns to the table marc_tag_structure which broke the import of biblio frameworks if the CSV file was generated with a previous version. Test plan: - Export a biblio framework from 17.11 - Import it into 18.05+ Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> https://bugs.koha-community.org/show_bug.cgi?id=21740
Created attachment 82236 [details] [review] Bug 21749: (QA follow-up) Add more tests for ImportFramework Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> https://bugs.koha-community.org/show_bug.cgi?id=21740
Created attachment 82240 [details] [review] Bug 21749: Add tests for ImportFramework Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 82241 [details] [review] Bug 21749: Fix import of CSV biblio framework Bug 9701 added 2 new columns to the table marc_tag_structure which broke the import of biblio frameworks if the CSV file was generated with a previous version. Test plan: - Export a biblio framework from 17.11 - Import it into 18.05+ Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> https://bugs.koha-community.org/show_bug.cgi?id=21740
Created attachment 82242 [details] [review] Bug 21749: (QA follow-up) Add more tests for ImportFramework This patch adds tests for: - Output of ImportFramework on fields removal and error conditions (file not found) - Different file format behaviour (csv, xml and ods are tested). To test: - Run $ kshell k$ prove t/db_dependent/ImportExportFramework.t => SUCCESS: All green :-D - Sign off :-D Note: the biblio_framework* files are based on the original one on the patchset, and exported in 17.11 with different formats. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 82338 [details] [review] Bug 21749: Add tests for ImportFramework Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 82339 [details] [review] Bug 21749: Fix import of CSV biblio framework Bug 9701 added 2 new columns to the table marc_tag_structure which broke the import of biblio frameworks if the CSV file was generated with a previous version. Test plan: - Export a biblio framework from 17.11 - Import it into 18.05+ Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> https://bugs.koha-community.org/show_bug.cgi?id=21740 Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 82340 [details] [review] Bug 21749: (QA follow-up) Add more tests for ImportFramework This patch adds tests for: - Output of ImportFramework on fields removal and error conditions (file not found) - Different file format behaviour (csv, xml and ods are tested). To test: - Run $ kshell k$ prove t/db_dependent/ImportExportFramework.t => SUCCESS: All green :-D - Sign off :-D Note: the biblio_framework* files are based on the original one on the patchset, and exported in 17.11 with different formats. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Awesome work all! Pushed to master for 18.11
Pushed to 18.05.x for 18.05.06
Depends on Bug 9701 not in 17.11.x