Summary: | bulkmarcimport.pl broken by OAI-PMH:AutoUpdateSets(EmbedItemData) | ||
---|---|---|---|
Product: | Koha | Reporter: | Magnus Enger <magnus> |
Component: | Command-line Utilities | Assignee: | Frédéric Demians <f.demians> |
Status: | CLOSED FIXED | QA Contact: | Kyle M Hall (khall) <kyle> |
Severity: | major | ||
Priority: | P5 - low | CC: | david, dcook, f.demians, fridolin.somers, kyle, lucas, robin, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
22.11.00,22.05.05,21.11.12, 21.05.19
|
|
Circulation function: | |||
Attachments: |
Bug 30308 - Fix bulkmarcimport.pl broken by OAI-PMH:AutoUpdateSets(EmbedItemData)
Bug 30308 - Fix bulkmarcimport.pl broken by OAI-PMH:AutoUpdateSets(EmbedItemData) Bug 30308 - Fix bulkmarcimport.pl broken by OAI-PMH:AutoUpdateSets(EmbedItemData) Bug 30308: Fix bulkmarcimport.pl broken by OAI-PMH:AutoUpdateSets(EmbedItemData) |
Description
Magnus Enger
2022-03-17 10:46:17 UTC
This stood out to me as I have some plugin code in C4::Biblio::AddBiblio which fails due to bulkmarcimport.pl using defer_marc_save. I imagine this wouldn't be an issue if we just got rid of the frustrating defer_marc_save via Bug 25539. Oh actually on another review... it's totally unrelated. Don't mind me. I'm just really biased against defer_marc_save [U+1F605] We should clone MARC::Record in UpdateOAISetsBiblio ? Created attachment 137502 [details] [review] Bug 30308 - Fix bulkmarcimport.pl broken by OAI-PMH:AutoUpdateSets(EmbedItemData) (In reply to Fridolin Somers from comment #3) > We should clone MARC::Record in UpdateOAISetsBiblio ? Yes! It solves the issue. Shouldn't this be Needs Signoff, Frederic? Could we get a test plan for this? Thanks! Created attachment 137630 [details] [review] Bug 30308 - Fix bulkmarcimport.pl broken by OAI-PMH:AutoUpdateSets(EmbedItemData) Test plan: (A) Reproduce the bug: A1 In Administration > System preferences > Web services: - Enable OAI-PMH - Enable OAI-PMH:AutoUpdateSets - Enable OAI-PMH:AutoUpdateSetsEmbedItemData A2 In Tools > Export data > Export bibliographic records, export 1 (one) biblio record. Be sure that this biblio record has at least one item. Don't tick "Don't export items". A3 Delete the exported biblio record, and its items. A4 In command line, on the server load the exported file: ./bulkmarcimport.pl -b -v -file /path/to/koha.mrc A5 Retrieve the biblio record in Koha. Note the absence of the item(s). This is the bug. (B) Apply the patch B1 Delete the record (without item) loaded at A4. B2 In command line, on the server load the exported file: ./bulkmarcimport.pl -b -v -file /path/to/koha.mrc B2 Retrieve the biblio record in Koha. Note the presence of the item(s). Created attachment 137721 [details] [review] Bug 30308 - Fix bulkmarcimport.pl broken by OAI-PMH:AutoUpdateSets(EmbedItemData) Test plan: (A) Reproduce the bug: A1 In Administration > System preferences > Web services: - Enable OAI-PMH - Enable OAI-PMH:AutoUpdateSets - Enable OAI-PMH:AutoUpdateSetsEmbedItemData A2 In Tools > Export data > Export bibliographic records, export 1 (one) biblio record. Be sure that this biblio record has at least one item. Don't tick "Don't export items". A3 Delete the exported biblio record, and its items. A4 In command line, on the server load the exported file: ./bulkmarcimport.pl -b -v -file /path/to/koha.mrc A5 Retrieve the biblio record in Koha. Note the absence of the item(s). This is the bug. (B) Apply the patch B1 Delete the record (without item) loaded at A4. B2 In command line, on the server load the exported file: ./bulkmarcimport.pl -b -v -file /path/to/koha.mrc B2 Retrieve the biblio record in Koha. Note the presence of the item(s). Signed-off-by: David Nind <david@davidnind.com> Thanks Frédéric for the test plan! Frederic, please don't forget to assign yourself! Created attachment 138301 [details] [review] Bug 30308: Fix bulkmarcimport.pl broken by OAI-PMH:AutoUpdateSets(EmbedItemData) Test plan: (A) Reproduce the bug: A1 In Administration > System preferences > Web services: - Enable OAI-PMH - Enable OAI-PMH:AutoUpdateSets - Enable OAI-PMH:AutoUpdateSetsEmbedItemData A2 In Tools > Export data > Export bibliographic records, export 1 (one) biblio record. Be sure that this biblio record has at least one item. Don't tick "Don't export items". A3 Delete the exported biblio record, and its items. A4 In command line, on the server load the exported file: ./bulkmarcimport.pl -b -v -file /path/to/koha.mrc A5 Retrieve the biblio record in Koha. Note the absence of the item(s). This is the bug. (B) Apply the patch B1 Delete the record (without item) loaded at A4. B2 In command line, on the server load the exported file: ./bulkmarcimport.pl -b -v -file /path/to/koha.mrc B2 Retrieve the biblio record in Koha. Note the presence of the item(s). Signed-off-by: David Nind <david@davidnind.com> Pushed to master for 22.11. Nice work everyone, thanks! Don't forget to sign, Kyle :) Thx for QA! Please backport to old branches Backported to 22.05.x for 22.05.05 Thanks! Pushed to 21.11 for 21.11.12 Backported: Pushed to 21.05.x branch for 21.05.19 nothing to document |