https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42569

--- Comment #1 from Tomás Cohen Arazi (tcohen) <[email protected]> ---
Created attachment 198885
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198885&action=edit
Bug 42569: Refactor Koha::Biblio->get_coins to use MetadataExtractor

Moves the MARC field extraction logic from get_coins into the
MetadataExtractor pattern:

- get_coins_data() in base ::MARC class handles leader parsing
  (genre/material type determination, same for MARC21 and UNIMARC)
- _extract_coins_fields() in each flavor subclass extracts authors,
  title, ISBN, ISSN, publisher, year, pages from flavor-specific fields
- get_coins() becomes a thin assembler that builds the OpenURL string
  from the extractor's output

Assisted-by: Sonnet 4.6 (Anthropic)

Test plan:
1. Apply patch
2. Run:
   $ ktd --shell
   k$ prove t/db_dependent/Koha/Biblio.t \
          t/db_dependent/Koha/Biblio/Metadata/Extractor/MARC/MARC21.t \
          t/db_dependent/Koha/Biblio/Metadata/Extractor/MARC/UNIMARC.t
=> SUCCESS: get_coins, get_coins_data tests pass (both flavors)
3. Verify COinS metadata in OPAC detail page source (look for
   <span class="Z3988">)
4. Sign off :-D

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to