[Bug 25460] New: Update OAI set (and optionally embed item information) when adding/editing/deleting items
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25460 Bug ID: 25460 Summary: Update OAI set (and optionally embed item information) when adding/editing/deleting items Change sponsored?: Sponsored Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Web services Assignee: alexbuckley@catalyst.net.nz Reporter: alexbuckley@catalyst.net.nz QA Contact: testopia@bugs.koha-community.org Currently the if you have a OAI set with mappings containing 952 subfields then when library staff add/edit/delete items the OAI set is not updated. OAI sets are only updated if: * OAI-PMH:AutoUpdateSets syspref is enabled & biblio record is added/edited/deleted This is because C4::OAI::Sets->UpdateOAISetsBiblio() is called from C4::Biblio->AddBiblio() or C4::Biblio->ModBiblio() neither of which are executed on adding/editing/deleting items. This patch will call C4::OAI::Sets->UpdateOAISetsBiblio() when adding/editing/deleting items as well as biblios if OAI-PMH:AutoUpdateSets syspref is enabled. It will also allow library staff to define if they want item information embedded in these automatic updates. i.e. they have mappings on 952 field and want those subfields to be checked when adding/editing/deleting items. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25460 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25460 --- Comment #1 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 104721 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104721&action=edit Bug 25460: Update OAI sets when adding/editing/deleting item records Test plan: 1. Enable OAI-PMH and OAI-PMH:AutoUpdateSets sysprefs 2. Create a biblio record with 1 item with CCODE of NFIC 3. In Administration > OAI Sets configuration create a set and define the mapping: Field: 952, Subfield: 8, Operator: is equal to, Value: FIC 4. Run the build_oai_sets.pl script: cd misc/migration_tools sudo koha-shell <instancename> ./build_oai_sets.pl -i 5. Check what items are in the OAI set: sudo koha-mysql <instancename> select * from oai_sets_biblios; 6. Observe your bib from step 2 is not in the set 7. [EDIT] Edit the item to have CCODE of FIC repeat step 5 and observe biblio is still not in OAI set 8. [ADD] Add a new item with CCODE of FIC and repeat step 5 and observe biblio still not in OAI set 9. [DELETE] Delete one of your 2 items and repeat step 5 and observe biblio still not in OAI set 10. Apply patch, update database and restart plack (instruction below on the latter 2 actions): cd installer/data/mysql sudo koha-shell <instancename> ./updatedatabase.pl sudo koha-plack --restart <instancename> 11. Enable new syspref OAI-PMH:AutoUpdateSetsEmbedItemData 12. [ADD] Repeat step 8 and observe biblio is now in the OAI set 13. [EDIT] Edit both items to have a CCODE of NFIC and repeat step 5 and observe bib now not in set 14. [EDIT] Edit one of the items to have CCODE of FIC and repeat step 5 and observe bib now in set 15. [DELETE] Delete all items off bib and repeat step 5 and observe bib no longer in set Sponsored-By: Catalyst IT -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25460 Alex Buckley <alexbuckley@catalyst.net.nz> 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=25460 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |Update OAI sets when item release notes| |records are created or | |updated. | | | |Allow library | |staff to embed item record | |data when creating or | |updating records so that | |OAI set mappings of 952 | |MARC subfields are | |respected. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25460 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #104721|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=25460 --- Comment #2 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 104983 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104983&action=edit Bug 25460: Update OAI sets when adding/editing/deleting item records Test plan: 1. Enable OAI-PMH and OAI-PMH:AutoUpdateSets sysprefs 2. Create a biblio record with 1 item with CCODE of NFIC 3. In Administration > OAI Sets configuration create a set and define the mapping: Field: 952, Subfield: 8, Operator: is equal to, Value: FIC 4. Run the build_oai_sets.pl script: cd misc/migration_tools sudo koha-shell <instancename> ./build_oai_sets.pl -i 5. Check what items are in the OAI set: sudo koha-mysql <instancename> select * from oai_sets_biblios; 6. Observe your bib from step 2 is not in the set 7. [EDIT] Edit the item to have CCODE of FIC repeat step 5 and observe biblio is still not in OAI set 8. [ADD] Add a new item with CCODE of FIC and repeat step 5 and observe biblio still not in OAI set 9. [DELETE] Delete one of your 2 items and repeat step 5 and observe biblio still not in OAI set 10. Apply patch, update database and restart plack (instruction below on the latter 2 actions): cd installer/data/mysql sudo koha-shell <instancename> ./updatedatabase.pl sudo koha-plack --restart <instancename> 11. Enable new syspref OAI-PMH:AutoUpdateSetsEmbedItemData 12. [ADD] Repeat step 8 and observe biblio is now in the OAI set 13. [EDIT] Edit both items to have a CCODE of NFIC and repeat step 5 and observe bib now not in set 14. [EDIT] Edit one of the items to have CCODE of FIC and repeat step 5 and observe bib now in set 15. [DELETE] Delete all items off bib and repeat step 5 and observe bib no longer in set Sponsored-By: Catalyst IT -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25460 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #104983|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=25460 --- Comment #3 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 104985 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104985&action=edit Bug 25460: Update OAI sets when adding/editing/deleting item records Test plan: 1. Enable OAI-PMH and OAI-PMH:AutoUpdateSets sysprefs 2. Create a biblio record with 1 item with CCODE of NFIC 3. In Administration > OAI Sets configuration create a set and define the mapping: Field: 952, Subfield: 8, Operator: is equal to, Value: FIC 4. Run the build_oai_sets.pl script: cd misc/migration_tools sudo koha-shell <instancename> ./build_oai_sets.pl -i 5. Check what items are in the OAI set: sudo koha-mysql <instancename> select * from oai_sets_biblios; 6. Observe your bib from step 2 is not in the set 7. [EDIT] Edit the item to have CCODE of FIC repeat step 5 and observe biblio is still not in OAI set 8. [ADD] Add a new item with CCODE of FIC and repeat step 5 and observe biblio still not in OAI set 9. [DELETE] Delete one of your 2 items and repeat step 5 and observe biblio still not in OAI set 10. Apply patch, update database and restart plack (instruction below on the latter 2 actions): cd installer/data/mysql sudo koha-shell <instancename> ./updatedatabase.pl sudo koha-plack --restart <instancename> 11. Enable new syspref OAI-PMH:AutoUpdateSetsEmbedItemData 12. [ADD] Repeat step 8 and observe biblio is now in the OAI set 13. [EDIT] Edit both items to have a CCODE of NFIC and repeat step 5 and observe bib now not in set 14. [EDIT] Edit one of the items to have CCODE of FIC and repeat step 5 and observe bib now in set 15. [DELETE] Delete all items off bib and repeat step 5 and observe bib no longer in set Sponsored-By: Catalyst IT -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25460 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #104985|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=25460 --- Comment #4 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 104986 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104986&action=edit Bug 25460: Update OAI sets when adding/editing/deleting item records Test plan: 1. Enable OAI-PMH and OAI-PMH:AutoUpdateSets sysprefs 2. Create a biblio record with 1 item with CCODE of NFIC 3. In Administration > OAI Sets configuration create a set and define the mapping: Field: 952, Subfield: 8, Operator: is equal to, Value: FIC 4. Run the build_oai_sets.pl script: cd misc/migration_tools sudo koha-shell <instancename> ./build_oai_sets.pl -i 5. Check what items are in the OAI set: sudo koha-mysql <instancename> select * from oai_sets_biblios; 6. Observe your bib from step 2 is not in the set 7. [EDIT] Edit the item to have CCODE of FIC repeat step 5 and observe biblio is still not in OAI set 8. [ADD] Add a new item with CCODE of FIC and repeat step 5 and observe biblio still not in OAI set 9. [DELETE] Delete one of your 2 items and repeat step 5 and observe biblio still not in OAI set 10. Apply patch, update database and restart plack (instruction below on the latter 2 actions): cd installer/data/mysql sudo koha-shell <instancename> ./updatedatabase.pl sudo koha-plack --restart <instancename> 11. Enable new syspref OAI-PMH:AutoUpdateSetsEmbedItemData 12. [ADD] Repeat step 8 and observe biblio is now in the OAI set 13. [EDIT] Edit both items to have a CCODE of NFIC and repeat step 5 and observe bib now not in set 14. [EDIT] Edit one of the items to have CCODE of FIC and repeat step 5 and observe bib now in set 15. [DELETE] Delete all items off bib and repeat step 5 and observe bib no longer in set Sponsored-By: Catalyst IT -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25460 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #104986|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=25460 --- Comment #5 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 104987 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104987&action=edit Bug 25460: Update OAI sets when adding/editing/deleting item records Also adds syspref to optionally choose to embed item information in record when adding/editing bibliographic and item records. Test plan: 1. Enable OAI-PMH and OAI-PMH:AutoUpdateSets sysprefs 2. Create a biblio record with 1 item with CCODE of NFIC 3. In Administration > OAI Sets configuration create a set and define the mapping: Field: 952, Subfield: 8, Operator: is equal to, Value: FIC 4. Run the build_oai_sets.pl script: cd misc/migration_tools sudo koha-shell <instancename> ./build_oai_sets.pl -i 5. Check what items are in the OAI set: sudo koha-mysql <instancename> select * from oai_sets_biblios; 6. Observe your bib from step 2 is not in the set 7. [ITEM EDIT] Edit the item to have CCODE of FIC repeat step 5 and observe biblio is still not in OAI set 8. [ITEM ADD] Add a new item with CCODE of FIC and repeat step 5 and observe biblio still not in OAI set 9. [ITEM DELETE] Delete one of your 2 items and repeat step 5 and observe biblio still not in OAI set 10. Apply patch, update database and restart plack (instruction below on the latter 2 actions): cd installer/data/mysql sudo koha-shell <instancename> ./updatedatabase.pl sudo koha-plack --restart <instancename> 11. Enable new syspref OAI-PMH:AutoUpdateSetsEmbedItemData 12. [ITEM ADD] Repeat step 8 and observe biblio is now in the OAI set 13. [ITEM EDIT] Edit both items to have a CCODE of NFIC and repeat step 5 and observe bib now not in set 14. [ITEM EDIT] Edit one of the items to have CCODE of FIC and repeat step 5 and observe bib now in set 15. [ITEM DELETE] Delete all items off bib and repeat step 5 and observe bib no longer in set Sponsored-By: Catalyst IT -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25460 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #104987|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=25460 --- Comment #6 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 109560 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=109560&action=edit Bug 25460: Update OAI sets when adding/editing/deleting item records Also adds syspref to optionally choose to embed item information in record when adding/editing bibliographic and item records. Test plan: 1. Enable OAI-PMH and OAI-PMH:AutoUpdateSets sysprefs 2. Create a biblio record with 1 item with CCODE of NFIC 3. In Administration > OAI Sets configuration create a set and define the mapping: Field: 952, Subfield: 8, Operator: is equal to, Value: FIC 4. Run the build_oai_sets.pl script: cd misc/migration_tools sudo koha-shell <instancename> ./build_oai_sets.pl -i 5. Check what items are in the OAI set: sudo koha-mysql <instancename> select * from oai_sets_biblios; 6. Observe your bib from step 2 is not in the set 7. [ITEM EDIT] Edit the item to have CCODE of FIC repeat step 5 and observe biblio is still not in OAI set 8. [ITEM ADD] Add a new item with CCODE of FIC and repeat step 5 and observe biblio still not in OAI set 9. [ITEM DELETE] Delete one of your 2 items and repeat step 5 and observe biblio still not in OAI set 10. Apply patch, update database and restart plack (instruction below on the latter 2 actions): cd installer/data/mysql sudo koha-shell <instancename> ./updatedatabase.pl sudo koha-plack --restart <instancename> 11. Enable new syspref OAI-PMH:AutoUpdateSetsEmbedItemData 12. [ITEM ADD] Repeat step 8 and observe biblio is now in the OAI set 13. [ITEM EDIT] Edit both items to have a CCODE of NFIC and repeat step 5 and observe bib now not in set 14. [ITEM EDIT] Edit one of the items to have CCODE of FIC and repeat step 5 and observe bib now in set 15. [ITEM DELETE] Delete all items off bib and repeat step 5 and observe bib no longer in set Sponsored-By: Catalyst IT -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25460 --- Comment #7 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Rebased against master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25460 David Nind <david@davidnind.com> 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=25460 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #109560|0 |1 is obsolete| | --- Comment #8 from David Nind <david@davidnind.com> --- Created attachment 110435 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110435&action=edit Bug 25460: Update OAI sets when adding/editing/deleting item records Also adds syspref to optionally choose to embed item information in record when adding/editing bibliographic and item records. Test plan: 1. Enable OAI-PMH and OAI-PMH:AutoUpdateSets sysprefs 2. Create a biblio record with 1 item with CCODE of NFIC 3. In Administration > OAI Sets configuration create a set and define the mapping: Field: 952, Subfield: 8, Operator: is equal to, Value: FIC 4. Run the build_oai_sets.pl script: cd misc/migration_tools sudo koha-shell <instancename> ./build_oai_sets.pl -i 5. Check what items are in the OAI set: sudo koha-mysql <instancename> select * from oai_sets_biblios; 6. Observe your bib from step 2 is not in the set 7. [ITEM EDIT] Edit the item to have CCODE of FIC repeat step 5 and observe biblio is still not in OAI set 8. [ITEM ADD] Add a new item with CCODE of FIC and repeat step 5 and observe biblio still not in OAI set 9. [ITEM DELETE] Delete one of your 2 items and repeat step 5 and observe biblio still not in OAI set 10. Apply patch, update database and restart plack (instruction below on the latter 2 actions): cd installer/data/mysql sudo koha-shell <instancename> ./updatedatabase.pl sudo koha-plack --restart <instancename> 11. Enable new syspref OAI-PMH:AutoUpdateSetsEmbedItemData 12. [ITEM ADD] Repeat step 8 and observe biblio is now in the OAI set 13. [ITEM EDIT] Edit both items to have a CCODE of NFIC and repeat step 5 and observe bib now not in set 14. [ITEM EDIT] Edit one of the items to have CCODE of FIC and repeat step 5 and observe bib now in set 15. [ITEM DELETE] Delete all items off bib and repeat step 5 and observe bib no longer in set Sponsored-By: Catalyst IT Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25460 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Alex, can we please have a unit test highlighting the change? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25460 --- Comment #10 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 110645 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110645&action=edit Bug 25460 : Add unit test for change to C4::OAI::Sets->UpdateOAISetsBiblio() Test plan: 1. Run unit test: sudo koha-shell <instancename> prove t/db_dependent/OAI/Sets.t 2. All tests should pass Sponsored-by: Catalyst IT -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25460 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #11 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Thanks David and Katrin. Attached is a unit test patch amending t/db_dependent/OAI/Sets.t to cover changes to C4/OAI/Sets.t Could you please re-test? Many thanks, Alex -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25460 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |david@davidnind.com --- Comment #12 from David Nind <david@davidnind.com> --- Hi Alex. I retested, but the tests failed for me: root@kohadevbox:koha(bz25460)$ prove t/db_dependent/OAI/Sets.t t/db_dependent/OAI/Sets.t .. 1/153 C4::OAI::Sets::AddOAISetsBiblios(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry '444-7' for key 'PRIMARY' [for Statement " INSERT INTO oai_sets_biblios (set_id, biblionumber) VALUES (?,?) " with ParamValues: 0='7', 1=444] at t/db_dependent/OAI/Sets.t line 370 # Looks like your test exited with 255 just after 100. t/db_dependent/OAI/Sets.t .. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 53/153 subtests Test Summary Report ------------------- t/db_dependent/OAI/Sets.t (Wstat: 65280 Tests: 100 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 153 tests but ran 100. Files=1, Tests=100, 2 wallclock secs ( 0.03 usr 0.01 sys + 1.50 cusr 0.15 csys = 1.69 CPU) Result: FAIL Note: 1. If I apply the patch on a clean setup and don't enable the OAI-PMH system preferences the tests pass. 2. If I apply the patch on a clean setup and enable the OAI-PMH system preferences the test fail. Also, a really minor thing - there is an unnecessary " at the end of the description note for the new system preference. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25460 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |ASSIGNED --- Comment #13 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Hi David, Ohh, thanks for noting that! I'll look into why that's happening and hopefully update the patches on here today. Thanks, Alex -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25460 --- Comment #14 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Just noting I've found this problem appears on master too. When you have the OAI-PMH:AutoUpdateSets syspref disabled the t/db_dependent/OAI/Sets.t tests pass, and when that syspref is enabled they fail. Thanks for noting it David! I'll work on a fix for this. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25460 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #110645|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=25460 --- Comment #15 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 111051 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111051&action=edit Bug 25460 : Add unit test for change to C4::OAI::Sets->UpdateOAISetsBiblio() Test plan: 1. Run unit test: sudo koha-shell <instancename> prove t/db_dependent/OAI/Sets.t 2. All tests should pass Sponsored-by: Catalyst IT -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25460 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Depends on| |26589 --- Comment #16 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Hi David, I've written a fix for the failing t/db_dependent/OAI/Sets.t unit tests when the OAI-PMH:AutoUpdateSets syspref is enabled. As noted in comment #14 this unit test is failing on master when that syspref is enabled, so as this problem is separate from this enhancement I've put the fix on a separate bug report bug 26589 Could you please re-test this patchset after applying 26589 first? Many thanks, Alex Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26589 [Bug 26589] t/db_dependent/OAI/Sets.t unit test fails due to OAI-PMH:AutoUpdateSets syspref -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25460 David Nind <david@davidnind.com> 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=25460 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #110435|0 |1 is obsolete| | --- Comment #17 from David Nind <david@davidnind.com> --- Created attachment 111085 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111085&action=edit Bug 25460: Update OAI sets when adding/editing/deleting item records Also adds syspref to optionally choose to embed item information in record when adding/editing bibliographic and item records. Test plan: 1. Enable OAI-PMH and OAI-PMH:AutoUpdateSets sysprefs 2. Create a biblio record with 1 item with CCODE of NFIC 3. In Administration > OAI Sets configuration create a set and define the mapping: Field: 952, Subfield: 8, Operator: is equal to, Value: FIC 4. Run the build_oai_sets.pl script: cd misc/migration_tools sudo koha-shell <instancename> ./build_oai_sets.pl -i 5. Check what items are in the OAI set: sudo koha-mysql <instancename> select * from oai_sets_biblios; 6. Observe your bib from step 2 is not in the set 7. [ITEM EDIT] Edit the item to have CCODE of FIC repeat step 5 and observe biblio is still not in OAI set 8. [ITEM ADD] Add a new item with CCODE of FIC and repeat step 5 and observe biblio still not in OAI set 9. [ITEM DELETE] Delete one of your 2 items and repeat step 5 and observe biblio still not in OAI set 10. Apply patch, update database and restart plack (instruction below on the latter 2 actions): cd installer/data/mysql sudo koha-shell <instancename> ./updatedatabase.pl sudo koha-plack --restart <instancename> 11. Enable new syspref OAI-PMH:AutoUpdateSetsEmbedItemData 12. [ITEM ADD] Repeat step 8 and observe biblio is now in the OAI set 13. [ITEM EDIT] Edit both items to have a CCODE of NFIC and repeat step 5 and observe bib now not in set 14. [ITEM EDIT] Edit one of the items to have CCODE of FIC and repeat step 5 and observe bib now in set 15. [ITEM DELETE] Delete all items off bib and repeat step 5 and observe bib no longer in set Sponsored-By: Catalyst IT Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25460 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111051|0 |1 is obsolete| | --- Comment #18 from David Nind <david@davidnind.com> --- Created attachment 111086 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111086&action=edit Bug 25460 : Add unit test for change to C4::OAI::Sets->UpdateOAISetsBiblio() Test plan: 1. Run unit test: sudo koha-shell <instancename> prove t/db_dependent/OAI/Sets.t 2. All tests should pass Sponsored-by: Catalyst IT Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25460 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25460 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111085|0 |1 is obsolete| | Attachment #111086|0 |1 is obsolete| | --- Comment #19 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 111644 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111644&action=edit Bug 25460: Update OAI sets when adding/editing/deleting item records Also adds syspref to optionally choose to embed item information in record when adding/editing bibliographic and item records. Test plan: 1. Enable OAI-PMH and OAI-PMH:AutoUpdateSets sysprefs 2. Create a biblio record with 1 item with CCODE of NFIC 3. In Administration > OAI Sets configuration create a set and define the mapping: Field: 952, Subfield: 8, Operator: is equal to, Value: FIC 4. Run the build_oai_sets.pl script: cd misc/migration_tools sudo koha-shell <instancename> ./build_oai_sets.pl -i 5. Check what items are in the OAI set: sudo koha-mysql <instancename> select * from oai_sets_biblios; 6. Observe your bib from step 2 is not in the set 7. [ITEM EDIT] Edit the item to have CCODE of FIC repeat step 5 and observe biblio is still not in OAI set 8. [ITEM ADD] Add a new item with CCODE of FIC and repeat step 5 and observe biblio still not in OAI set 9. [ITEM DELETE] Delete one of your 2 items and repeat step 5 and observe biblio still not in OAI set 10. Apply patch, update database and restart plack (instruction below on the latter 2 actions): cd installer/data/mysql sudo koha-shell <instancename> ./updatedatabase.pl sudo koha-plack --restart <instancename> 11. Enable new syspref OAI-PMH:AutoUpdateSetsEmbedItemData 12. [ITEM ADD] Repeat step 8 and observe biblio is now in the OAI set 13. [ITEM EDIT] Edit both items to have a CCODE of NFIC and repeat step 5 and observe bib now not in set 14. [ITEM EDIT] Edit one of the items to have CCODE of FIC and repeat step 5 and observe bib now in set 15. [ITEM DELETE] Delete all items off bib and repeat step 5 and observe bib no longer in set Sponsored-By: Catalyst IT Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25460 --- Comment #20 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 111645 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111645&action=edit Bug 25460: Add unit test for change to C4::OAI::Sets->UpdateOAISetsBiblio() Test plan: 1. Run unit test: sudo koha-shell <instancename> prove t/db_dependent/OAI/Sets.t 2. All tests should pass Sponsored-by: Catalyst IT Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25460 --- Comment #21 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 111646 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111646&action=edit Bug 25460: (QA follow-up) Readd ending punctuation to sys pref description Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25460 --- Comment #22 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Thank you David and Katrin! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25460 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Update OAI set (and |Allow using item |optionally embed item |information in OAI set |information) when |mappings and automatically |adding/editing/deleting |update sets when items are |items |added, edited or deleted Text to go in the|Update OAI sets when item |This allows library staff release notes|records are created or |to use information from |updated. |items when creating | |mappings for OAI sets. When |Allow library |the new system preference |staff to embed item record |OAI-PMH:AutoUpdateSetsEmbed |data when creating or |ItemData is set, editing, |updating records so that |deleting or adding items |OAI set mappings of 952 |will update records listed |MARC subfields are |in the OAI sets according |respected. |to the mapppings. --- Comment #23 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I wonder if the bug description might be a little misleading. This makes it possible to use 952 in your OAI set mappings and it makes the updates of the OAI sets happen nicely when items are changed/added/updated. But what it not does is embedding item information in the output formats - you still have to set the conf file and flag for marcxml in order to make that happen. So I am changing the title slightly, let me know if you disagree. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25460 --- Comment #24 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 111647 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111647&action=edit Bug 25460: (QA follow-up) Remove stray quote from system preference descrpition -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25460 --- Comment #25 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Hi Katrin, Thank you for clarifying that. I agree with your changes. This patchset ensures OAI sets are altered when items are added/altered (if 952 subfields are defined in the OAI set mappings). But as you say, it doesn't mean item data will automatically be embedded in the OAI sets output. Thanks, Alex -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25460 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111645|0 |1 is obsolete| | --- Comment #26 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 111694 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111694&action=edit Bug 25460: Add unit test for change to C4::OAI::Sets->UpdateOAISetsBiblio() Test plan: 1. Run unit test: sudo koha-shell <instancename> prove t/db_dependent/OAI/Sets.t 2. All tests should pass Sponsored-by: Catalyst IT Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> JD amended patch: Put tests inside a subtest, and perltidy -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25460 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111647|0 |1 is obsolete| | --- Comment #27 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 111695 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111695&action=edit Bug 25460: (QA follow-up) Remove stray quote from system preference description -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25460 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.11.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=25460 --- Comment #28 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 20.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25460 --- Comment #29 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 111715 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111715&action=edit Bug 25460: Remove swp file Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25460 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #30 from Lucas Gass <lucas@bywatersolutions.com> --- enhancement will not be backported to 20.05.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org