[Bug 42563] New: Add Koha::Biblio->host_items using MetadataExtractor
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42563 Bug ID: 42563 Summary: Add Koha::Biblio->host_items using MetadataExtractor Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org Currently, C4::Items::get_hostitemnumbers_of is the only way to get items linked via MARC 773$9 (MARC21) / 461$9 (UNIMARC) host record fields. This function lives in the C4:: namespace and mixes MARC parsing with DB queries. This bug adds: 1. get_host_itemnumbers method to Koha::Biblio::Metadata::Extractor::MARC::MARC21 and ::UNIMARC â extracts itemnumbers from the appropriate MARC field 2. Koha::Biblio->host_items â convenience method returning a Koha::Items resultset (gated behind EasyAnalyticalRecords syspref) Replaces C4::Items::get_hostitemnumbers_of using the MetadataExtractor pattern from Bug 34828. Callers to migrate: - Koha::Biblio::Availability::Hold (Bug 42386) - C4::ILSDI::Services::HoldTitle - reserve/request.pl -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42563 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42563 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |34828, 42386 Status|NEW |ASSIGNED Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34828 [Bug 34828] Add Koha::Biblio::Metadata::Extractor* classes https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42386 [Bug 42386] Unify hold availability checks into Koha::Availability pattern -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42563 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|42386 | Summary|Add |Implement |Koha::Biblio->host_items |Koha::Biblio->host_items |using MetadataExtractor |using MetadataExtractor Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42386 [Bug 42386] Unify hold availability checks into Koha::Availability pattern -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42563 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42563 --- Comment #1 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 198843 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198843&action=edit Bug 42563: Add get_host_itemnumbers to MetadataExtractor Adds get_host_itemnumbers() to the MARC21 (773$9) and UNIMARC (461$9) metadata extractors. Refactors Koha::Biblio::_host_itemnumbers to use the extractor instead of inline MARC parsing. The existing Koha::Biblio->host_items method and its callers are unchanged -- only the internal implementation moves to the extractor. Assisted-by: Sonnet 4.6 (Anthropic) Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/Biblio/Metadata/Extractor/MARC/MARC21.t \ t/db_dependent/Koha/Biblio/Metadata/Extractor/MARC/UNIMARC.t => SUCCESS: Extractor tests pass k$ prove t/db_dependent/Koha/Biblio.t => SUCCESS: host_items() subtest passes 3. Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42563 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198843|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=42563 --- Comment #2 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 198844 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198844&action=edit Bug 42563: Add get_host_itemnumbers to MetadataExtractor Adds get_host_itemnumbers() to the MARC21 (773$9) and UNIMARC (461$9) metadata extractors. Refactors Koha::Biblio::_host_itemnumbers to use the extractor instead of inline MARC parsing. The existing Koha::Biblio->host_items method and its callers are unchanged -- only the internal implementation moves to the extractor. Assisted-by: Sonnet 4.6 (Anthropic) Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/Biblio/Metadata/Extractor/MARC/MARC21.t \ t/db_dependent/Koha/Biblio/Metadata/Extractor/MARC/UNIMARC.t => SUCCESS: Extractor tests pass k$ prove t/db_dependent/Koha/Biblio.t => SUCCESS: host_items() subtest passes 3. Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42563 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=42563 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198844|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=42563 --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 198863 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198863&action=edit Bug 42563: Add get_host_itemnumbers to MetadataExtractor Adds get_host_itemnumbers() to the MARC21 (773$9) and UNIMARC (461$9) metadata extractors. Refactors Koha::Biblio::_host_itemnumbers to use the extractor instead of inline MARC parsing. The existing Koha::Biblio->host_items method and its callers are unchanged -- only the internal implementation moves to the extractor. Assisted-by: Sonnet 4.6 (Anthropic) Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/Biblio/Metadata/Extractor/MARC/MARC21.t \ t/db_dependent/Koha/Biblio/Metadata/Extractor/MARC/UNIMARC.t => SUCCESS: Extractor tests pass k$ prove t/db_dependent/Koha/Biblio.t => SUCCESS: host_items() subtest passes 3. Sign off :-D 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=42563 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |42569 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42569 [Bug 42569] Refactor Koha::Biblio->get_coins to use MetadataExtractor -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42563 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198863|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=42563 --- Comment #4 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 201884 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201884&action=edit Bug 42563: Add get_host_itemnumbers to MetadataExtractor Adds get_host_itemnumbers() to the MARC21 (773$9) and UNIMARC (461$9) metadata extractors. Refactors Koha::Biblio::_host_itemnumbers to use the extractor instead of inline MARC parsing. The existing Koha::Biblio->host_items method and its callers are unchanged -- only the internal implementation moves to the extractor. Assisted-by: Sonnet 4.6 (Anthropic) Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/Biblio/Metadata/Extractor/MARC/MARC21.t \ t/db_dependent/Koha/Biblio/Metadata/Extractor/MARC/UNIMARC.t => SUCCESS: Extractor tests pass k$ prove t/db_dependent/Koha/Biblio.t => SUCCESS: host_items() subtest passes 3. Sign off :-D Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org