Bug 35203 - Koha::Biblio->get_coins support 214 field in addition to 210 (pubyear and publisher values) (UNIMARC)
Summary: Koha::Biblio->get_coins support 214 field in addition to 210 (pubyear and pub...
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Thibaud Guillot (thibaud_g)
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-31 14:09 UTC by Thibaud Guillot (thibaud_g)
Modified: 2024-06-18 01:56 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 35203: Add 214 field for pubyear and publisher values (1.34 KB, patch)
2023-10-31 14:13 UTC, Thibaud Guillot (thibaud_g)
Details | Diff | Splinter Review
Bug 35203: Add 214 field for pubyear and publisher values (1.33 KB, patch)
2023-11-13 11:10 UTC, Thibaud Guillot (thibaud_g)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Thibaud Guillot (thibaud_g) 2023-10-31 14:09:13 UTC
Hello,

The publisher info and publication date for the <span Z3988> tag (corners) are based on the 210
but more and more records are now based on 214. Hence a loss of information.
NB This is also the case for BIBTEXT and RIS formats.

I will therefore propose a patch to add the new 214 field to the get->coins() method.
Comment 1 Thibaud Guillot (thibaud_g) 2023-10-31 14:13:10 UTC Comment hidden (obsolete)
Comment 2 Thibaud Guillot (thibaud_g) 2023-11-13 11:10:04 UTC
Created attachment 158874 [details] [review]
Bug 35203: Add 214 field for pubyear and publisher values

Obtain values for field 214 in addition to field 210
Comment 3 David Nind 2024-06-02 23:46:21 UTC
Not sure how to test correctly. 

I thought doing the following would result in search results after the patch was applied - I get no results after the patch is applied:

1. Start up KTD using UNIMARC:
   . Edit .env and change KOHA_MARC_FLAVOUR=unimarc

2. Edit any record so that:
   . all required fields have a value
   . item(s) for record display (items may need editing so that they have valid values for any lookup fields, otherwise you get a 500 error and items aren't displayed in the holdings table)

3. Edit the record so that there are unique values in 214$c (Publisher) and 214$d (Publication year). For example, Your name and 2024

4. Do advanced searches for Publisher and Publication date (Search dropdown > Advanced search)
  ==> Result: No results
Comment 4 Phil Ringnalda 2024-06-11 19:34:16 UTC
get_coins is used to create an invisible (other than in view-source) <span> element in the bib details page which is used by COinS / OpenURL clients, so a test plan would be something like "Install Zotero and a browser Zotero extension, create or edit a bib to have publisher and date in 214, visit the details page for that bib in either the staff client or OPAC, trigger your Zotero extension on that page, verify that the citation in Zotero includes the publisher and the date published."
Comment 5 David Nind 2024-06-18 01:56:15 UTC
Thanks Phil.

I had another go at testing using Zotero.

My experience was:
- I had a record with a 210$a, $c, and $d, and I added values for 214$c and $d.
- Before the patch in the OPAC:
  - the values from 214$c and $d were saved to the Zotero reference (saved as a Book for the Zotero Item Type)
  . if I deleted the 214$c and $d values, the 210 values were saved
- Before and after the patch in the staff interface: no values saved to Zotero (saved as a web page for the Zotero Item Type).
- Both before and after the patch, the RIS and BIBTEX formats had the values from 210$a, $c, and $d

Testing notes (using KTD):
1. Start up KTD using UNIMARC:
   . Edit .env and change KOHA_MARC_FLAVOUR=unimarc
2. Edit any record so that:
   . all required fields have a value
   . item(s) for record display (items may need editing so that they have valid values for any lookup fields, otherwise you get a 500 error and items aren't displayed in the holdings table)
3. Edit the record so that there are values in 214$c (Publisher) and 214$d (Publication year). For example, Your name and 2024
4. Install Zotero on your desktop and have it running: https://www.zotero.org/download/
5. Install the Zotero Connector for your browser (download from the link in step 4).
6. View the record from step 3 in the OPAC.
7. Save the page using the Zotero Connector to create a reference.
8. Note that:
   - The reference is saved as a Book for Zoetero's Item Type metadata field.
   - The publisher and date metadata fields should be populated with the values from 214$c and $d.
9. Apply the patch and restart everything.
10. Refresh the page.
11. Repeat step 7.
12. Note that the reference created in Zotero now has:
    . No difference noted