[Bug 42566] New: Remove C4::Koha::GetNormalizedUPC in favor of MetadataExtractor
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42566 Bug ID: 42566 Summary: Remove C4::Koha::GetNormalizedUPC in favor of 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 Depends on: 34828 C4::Koha::GetNormalizedUPC duplicates logic already available via Koha::Biblio::Metadata::Extractor (Bug 34828) and exposed as $biblio->normalized_upc. The implementations are semantically identical (same fields, same indicator check, same normalization logic). This bug removes GetNormalizedUPC and migrates all callers to use either $biblio->normalized_upc or the extractor directly. Callers to migrate: - C4::Search (only has MARC::Record, use extractor directly) - C4::ShelfBrowser (has $biblio) - opac-shelves.pl, opac-user.pl, opac-showreviews.pl (have $biblio) - virtualshelves/shelves.pl (has $biblio) Depends on Bug 34828. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34828 [Bug 34828] Add Koha::Biblio::Metadata::Extractor* classes -- 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=42566 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |35142 Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | Status|NEW |ASSIGNED CC| |tomascohen@gmail.com Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35142 [Bug 35142] Koha::Util::oclc_number should be removed in favor of Koha::Biblio::Metadata::Extractor -- 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=42566 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch 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=42566 --- Comment #1 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 198875 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198875&action=edit Bug 42566: Remove C4::Koha::GetNormalizedUPC in favor of MetadataExtractor GetNormalizedUPC duplicated logic already available via the MetadataExtractor (Bug 34828) and exposed as $biblio->normalized_upc. All callers migrated: - Scripts with $biblio available: use $biblio->normalized_upc - C4::Search (only MARC::Record): reuses the extractor instance already created for OCLC Assisted-by: Sonnet 4.6 (Anthropic) Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha.t \ t/db_dependent/Koha/Biblio.t => SUCCESS: Tests pass 3. Verify UPC numbers still display in OPAC and staff detail pages (Syndetics cover images) 4. 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=42566 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |42567 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |jonathan.druart@gmail.com |y.org | CC| |jonathan.druart@gmail.com Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42567 [Bug 42567] Remove C4::Koha::GetNormalizedEAN in favor of MetadataExtractor -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42566 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|34828 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34828 [Bug 34828] Add Koha::Biblio::Metadata::Extractor* classes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42566 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198875|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=42566 --- Comment #2 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 201773 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201773&action=edit Bug 42566: Remove C4::Koha::GetNormalizedUPC in favor of MetadataExtractor GetNormalizedUPC duplicated logic already available via the MetadataExtractor (Bug 34828) and exposed as $biblio->normalized_upc. All callers migrated: - Scripts with $biblio available: use $biblio->normalized_upc - C4::Search (only MARC::Record): reuses the extractor instance already created for OCLC Assisted-by: Sonnet 4.6 (Anthropic) Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha.t \ t/db_dependent/Koha/Biblio.t => SUCCESS: Tests pass 3. Verify UPC numbers still display in OPAC and staff detail pages (Syndetics cover images) 4. 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=42566 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201773|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=42566 --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 201847 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201847&action=edit Bug 42566: Remove C4::Koha::GetNormalizedUPC in favor of MetadataExtractor GetNormalizedUPC duplicated logic already available via the MetadataExtractor (Bug 34828) and exposed as $biblio->normalized_upc. All callers migrated: - Scripts with $biblio available: use $biblio->normalized_upc - C4::Search (only MARC::Record): reuses the extractor instance already created for OCLC Assisted-by: Sonnet 4.6 (Anthropic) Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha.t \ t/db_dependent/Koha/Biblio.t => SUCCESS: Tests pass 3. Verify UPC numbers still display in OPAC and staff detail pages (Syndetics cover images) 4. 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=42566 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=42566 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #4 from David Nind <david@davidnind.com> --- I've signed off, even though I don't have a Syndetics account to test against. Please change back to needs signoff if what I have tested is insufficient. Testing notes (using KTD): 1. Added a UPC code to a record (Programming perl, biblionumber=262): - 024 1_ $a724353912726 2. By default, this only shows on the OPAC ISBD view: Standard No.:724353912726 3. I assume you have to customize XSLT or use the record display customization tool to show elsewhere (for 024$a in the BKS framework, OPAC and staff interface visibility is enabled) -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org