To recreate: 1 - Stage the sample file on this report using the options below (If not using sample database simply save a record as marc from the details page, then change the title in the interface and import the saved version) 2 - Make sure to match using KohaBiblio (999c) 3 - Set option "Replace existing record" if match found 4 - Once record is staged go to Acquisitions 5 - Find a vendor and select/create an open basket 6 - Add to basket from the staged file 7 - Add order info and save 8 - Check the record, title is unchanged - Sample file should add 'New and improved!' 9 - Check the staged records batch - note the diff shows that new record should have overwritten
Created attachment 144538 [details] [review] Bug 32437: Cleanup script This patch: - fixes some indentation - flips unless-else to if-else for readability - expands some comments for clarity - removes unused biblioitemnum variable
Created attachment 144539 [details] [review] Bug 32437: Add Objects for ImportAuths This patch: 1 - Adds an atomic update to add a primary key to import_auths table 2 - Adds objects for Koha::Import::Records::Auths 3 - Adds tests for import auth and biblio objects
Created attachment 144540 [details] [review] Bug 32437: Add replace method to Koha::Import::Record objects This patch adds a replace routine to Koha::Import::Record - largely copying and updating code from C4::ImportBatch To test: prove t/db_dependent/Koha/Import/Records.t
Created attachment 144541 [details] [review] Bug 32437: Honor overlay setting in staged batch when adding to a basket This patch uses the replace method added in last patch to ensure records are overlayed when added to a basket To test: 1 - Stage the sample file on this report using the options below (If not using sample database simply save a record as marc from the details page, then change the title in the interface and import the saved version) 2 - Make sure to match using KohaBiblio (999c) 3 - Set option "Replace existing record" if match found 4 - Once record is staged go to Acquisitions 5 - Find a vendor and select/create an open basket 6 - Add to basket from the staged file 7 - Add order info and save 8 - Check the record, title is unchanged - Sample file should add 'New and improved!' 9 - Check the staged records batch - note the diff shows that new record should have overwritten 10 - Apply patch 11 - Stage file, match on KohaBiblio, set action if matching record found to 'Ignore incoming record' 12 - Add to basket from the staged file and save 13 - Confirm record not overlayed when not reuqested 14 - Stage file, match on KohaBiblio, set action if mathc record found to 'Replace existing...' 15 - Add to basket from staged file and save 16 - Confirm the record is updated to 'New and improved!'
Created attachment 144573 [details] [review] Bug 32437: Cleanup script This patch: - fixes some indentation - flips unless-else to if-else for readability - expands some comments for clarity - removes unused biblioitemnum variable
Created attachment 144574 [details] [review] Bug 32437: Add Objects for ImportAuths This patch: 1 - Adds an atomic update to add a primary key to import_auths table 2 - Adds objects for Koha::Import::Records::Auths 3 - Adds tests for import auth and biblio objects
Created attachment 144575 [details] [review] Bug 32437: Add replace method to Koha::Import::Record objects This patch adds a replace routine to Koha::Import::Record - largely copying and updating code from C4::ImportBatch To test: prove t/db_dependent/Koha/Import/Records.t
Created attachment 144576 [details] [review] Bug 32437: Honor overlay setting in staged batch when adding to a basket This patch uses the replace method added in last patch to ensure records are overlayed when added to a basket To test: 1 - Stage the sample file on this report using the options below (If not using sample database simply save a record as marc from the details page, then change the title in the interface and import the saved version) 2 - Make sure to match using KohaBiblio (999c) 3 - Set option "Replace existing record" if match found 4 - Once record is staged go to Acquisitions 5 - Find a vendor and select/create an open basket 6 - Add to basket from the staged file 7 - Add order info and save 8 - Check the record, title is unchanged - Sample file should add 'New and improved!' 9 - Check the staged records batch - note the diff shows that new record should have overwritten 10 - Apply patch 11 - Stage file, match on KohaBiblio, set action if matching record found to 'Ignore incoming record' 12 - Add to basket from the staged file and save 13 - Confirm record not overlayed when not reuqested 14 - Stage file, match on KohaBiblio, set action if mathc record found to 'Replace existing...' 15 - Add to basket from staged file and save 16 - Confirm the record is updated to 'New and improved!'
Created attachment 145223 [details] [review] Bug 32437: Cleanup script This patch: - fixes some indentation - flips unless-else to if-else for readability - expands some comments for clarity - removes unused biblioitemnum variable Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Created attachment 145224 [details] [review] Bug 32437: Add Objects for ImportAuths This patch: 1 - Adds an atomic update to add a primary key to import_auths table 2 - Adds objects for Koha::Import::Records::Auths 3 - Adds tests for import auth and biblio objects Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Created attachment 145225 [details] [review] Bug 32437: Add replace method to Koha::Import::Record objects This patch adds a replace routine to Koha::Import::Record - largely copying and updating code from C4::ImportBatch To test: prove t/db_dependent/Koha/Import/Records.t Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Created attachment 145226 [details] [review] Bug 32437: Honor overlay setting in staged batch when adding to a basket This patch uses the replace method added in last patch to ensure records are overlayed when added to a basket To test: 1 - Stage the sample file on this report using the options below (If not using sample database simply save a record as marc from the details page, then change the title in the interface and import the saved version) 2 - Make sure to match using KohaBiblio (999c) 3 - Set option "Replace existing record" if match found 4 - Once record is staged go to Acquisitions 5 - Find a vendor and select/create an open basket 6 - Add to basket from the staged file 7 - Add order info and save 8 - Check the record, title is unchanged - Sample file should add 'New and improved!' 9 - Check the staged records batch - note the diff shows that new record should have overwritten 10 - Apply patch 11 - Stage file, match on KohaBiblio, set action if matching record found to 'Ignore incoming record' 12 - Add to basket from the staged file and save 13 - Confirm record not overlayed when not reuqested 14 - Stage file, match on KohaBiblio, set action if mathc record found to 'Replace existing...' 15 - Add to basket from staged file and save 16 - Confirm the record is updated to 'New and improved!' Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Cannot finish right now, happy to continue next week..
Created attachment 147677 [details] [review] Bug 32437: Cleanup script This patch: - fixes some indentation - flips unless-else to if-else for readability - expands some comments for clarity - removes unused biblioitemnum variable Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 147678 [details] [review] Bug 32437: Add Objects for ImportAuths This patch: 1 - Adds an atomic update to add a primary key to import_auths table 2 - Adds objects for Koha::Import::Records::Auths 3 - Adds tests for import auth and biblio objects Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 147679 [details] [review] Bug 32437: Add replace method to Koha::Import::Record objects This patch adds a replace routine to Koha::Import::Record - largely copying and updating code from C4::ImportBatch To test: prove t/db_dependent/Koha/Import/Records.t Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 147680 [details] [review] Bug 32437: Honor overlay setting in staged batch when adding to a basket This patch uses the replace method added in last patch to ensure records are overlayed when added to a basket To test: 1 - Stage the sample file on this report using the options below (If not using sample database simply save a record as marc from the details page, then change the title in the interface and import the saved version) 2 - Make sure to match using KohaBiblio (999c) 3 - Set option "Replace existing record" if match found 4 - Once record is staged go to Acquisitions 5 - Find a vendor and select/create an open basket 6 - Add to basket from the staged file 7 - Add order info and save 8 - Check the record, title is unchanged - Sample file should add 'New and improved!' 9 - Check the staged records batch - note the diff shows that new record should have overwritten 10 - Apply patch 11 - Stage file, match on KohaBiblio, set action if matching record found to 'Ignore incoming record' 12 - Add to basket from the staged file and save 13 - Confirm record not overlayed when not reuqested 14 - Stage file, match on KohaBiblio, set action if mathc record found to 'Replace existing...' 15 - Add to basket from staged file and save 16 - Confirm the record is updated to 'New and improved!' Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 147681 [details] [review] Bug 32437: (QA follow-up) Change to replace POD Making it more visible that this also applies to authority records. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Hmm. Still looking a bit at the dbrev
Koha/Schema/Result/ImportAuth.pm | 23 ++++++-- Koha/Schema/Result/ImportRecord.pm | 12 ++--- These files should be removed from the patch and be on a separate DO NOT PUSH-one.
} elsif( !primary_key_exists('import_auths','import_record_id') ){ say $out "Found an existing PRIMARY KEY on import_auths table"; say $out "You must delete this key and replace it with a key on import_record_id"; } else { say $out "PRIMARY KEY import_record_id on import_auths already exists"; Since we assume in the schema that the primary key is import_record_id, we should bail out in the middle clause where we find another PK.
Temporary switch to FQA.
Created attachment 148270 [details] [review] Bug 32437: Cleanup script This patch: - fixes some indentation - flips unless-else to if-else for readability - expands some comments for clarity - removes unused biblioitemnum variable Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 148271 [details] [review] Bug 32437: Add Objects for ImportAuths This patch: 1 - Adds an atomic update to add a primary key to import_auths table 2 - Adds objects for Koha::Import::Records::Auths 3 - Adds tests for import auth and biblio objects Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 148272 [details] [review] Bug 32437: Add replace method to Koha::Import::Record objects This patch adds a replace routine to Koha::Import::Record - largely copying and updating code from C4::ImportBatch To test: prove t/db_dependent/Koha/Import/Records.t Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 148273 [details] [review] Bug 32437: Honor overlay setting in staged batch when adding to a basket This patch uses the replace method added in last patch to ensure records are overlayed when added to a basket To test: 1 - Stage the sample file on this report using the options below (If not using sample database simply save a record as marc from the details page, then change the title in the interface and import the saved version) 2 - Make sure to match using KohaBiblio (999c) 3 - Set option "Replace existing record" if match found 4 - Once record is staged go to Acquisitions 5 - Find a vendor and select/create an open basket 6 - Add to basket from the staged file 7 - Add order info and save 8 - Check the record, title is unchanged - Sample file should add 'New and improved!' 9 - Check the staged records batch - note the diff shows that new record should have overwritten 10 - Apply patch 11 - Stage file, match on KohaBiblio, set action if matching record found to 'Ignore incoming record' 12 - Add to basket from the staged file and save 13 - Confirm record not overlayed when not reuqested 14 - Stage file, match on KohaBiblio, set action if mathc record found to 'Replace existing...' 15 - Add to basket from staged file and save 16 - Confirm the record is updated to 'New and improved!' Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 148274 [details] [review] Bug 32437: (QA follow-up) Change to replace POD Making it more visible that this also applies to authority records. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 148275 [details] [review] Bug 32437: (QA follow-up) Prevent upgrade if wrong PRIMARY KEY key present
Created attachment 148276 [details] [review] Bug 32437: DO NOT PUSH - Schema Updates
Created attachment 148277 [details] [review] Bug 32437: (QA follow-up) Prevent upgrade if wrong PRIMARY KEY key present
Looking here again
Created attachment 148300 [details] [review] Bug 32437: Cleanup script This patch: - fixes some indentation - flips unless-else to if-else for readability - expands some comments for clarity - removes unused biblioitemnum variable Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 148301 [details] [review] Bug 32437: Add Objects for ImportAuths This patch: 1 - Adds an atomic update to add a primary key to import_auths table 2 - Adds objects for Koha::Import::Records::Auths 3 - Adds tests for import auth and biblio objects Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 148302 [details] [review] Bug 32437: Add replace method to Koha::Import::Record objects This patch adds a replace routine to Koha::Import::Record - largely copying and updating code from C4::ImportBatch To test: prove t/db_dependent/Koha/Import/Records.t Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 148303 [details] [review] Bug 32437: Honor overlay setting in staged batch when adding to a basket This patch uses the replace method added in last patch to ensure records are overlayed when added to a basket To test: 1 - Stage the sample file on this report using the options below (If not using sample database simply save a record as marc from the details page, then change the title in the interface and import the saved version) 2 - Make sure to match using KohaBiblio (999c) 3 - Set option "Replace existing record" if match found 4 - Once record is staged go to Acquisitions 5 - Find a vendor and select/create an open basket 6 - Add to basket from the staged file 7 - Add order info and save 8 - Check the record, title is unchanged - Sample file should add 'New and improved!' 9 - Check the staged records batch - note the diff shows that new record should have overwritten 10 - Apply patch 11 - Stage file, match on KohaBiblio, set action if matching record found to 'Ignore incoming record' 12 - Add to basket from the staged file and save 13 - Confirm record not overlayed when not reuqested 14 - Stage file, match on KohaBiblio, set action if mathc record found to 'Replace existing...' 15 - Add to basket from staged file and save 16 - Confirm the record is updated to 'New and improved!' Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 148304 [details] [review] Bug 32437: (QA follow-up) Change to replace POD Making it more visible that this also applies to authority records. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 148305 [details] [review] Bug 32437: DO NOT PUSH - Schema Updates Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 148306 [details] [review] Bug 32437: (QA follow-up) Prevent upgrade if wrong PRIMARY KEY key present Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Pushed to master for 23.05. Nice work everyone, thanks!
Nice work, thanks everyone! Pushed to 22.11.x for the next release.
Missing dependencies for 22.05.x, no backport