Bug 31536 - Add UNIMARC framework plugin to fetch PPN from sudoc.fr
Summary: Add UNIMARC framework plugin to fetch PPN from sudoc.fr
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Julian Maurice
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-08 14:05 UTC by Julian Maurice
Modified: 2023-12-28 20:42 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement adds a UNIMARC plugin (unimarc_field_009_ppn.pl) that uses sudoc.fr web services (isbn2ppn, issn2ppn, ean2ppn) to search for the Sudoc record identifier (PPN) using the ISBN, ISSN, or EAN identifiers as the search criteria. The plugin expects the ISBN in 010$a, ISSN in 011$a, and EAN in 073$a.
Version(s) released in:
22.11.00


Attachments
Bug 31536: Add UNIMARC framework plugin to fetch PPN from sudoc.fr (6.16 KB, patch)
2022-09-08 14:06 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 31536: Add UNIMARC framework plugin to fetch PPN from sudoc.fr (6.20 KB, patch)
2022-09-11 21:23 UTC, David Nind
Details | Diff | Splinter Review
Bug 31536: Add UNIMARC framework plugin to fetch PPN from sudoc.fr (6.26 KB, patch)
2022-10-03 21:26 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Maurice 2022-09-08 14:05:48 UTC

    
Comment 1 Julian Maurice 2022-09-08 14:06:33 UTC
Created attachment 140342 [details] [review]
Bug 31536: Add UNIMARC framework plugin to fetch PPN from sudoc.fr

This plugin uses sudoc.fr webservices (isbn2ppn, issn2ppn, ean2ppn) to
search a PPN using ISBN, ISSN or EAN as search criteria.
The plugin expects than ISBN is in 010$a, ISSN is in 011$a and EAN is in
073$a.

Test plan:
1. Configure the default MARC framework so that 009 uses this plugin
   (unimarc_field_009_ppn.pl)
2. Start creating a new bibliographic record
3. In the editor, write "0195141156" in the 010$a input, then move the
   focus out of the input (by pressing Tab, or clicking elsewhere on the
   page)
   The 009 field should be automatically filled with "06735209X"
4. Empty the 010$a input, then empty the 009 input
5. Write "2262-4694" in the 011$a input, then move the focus out of the
   input
   The 009 field should be automatically filled with "166197947"
6. Empty the 011$a input, then empty the 009 input
7. Write "9782070424597" in the 073$a input, then move the focus out of
   the input
   The 009 field should be automatically filled with "151662983"
8. Empty only the 009 field, keep the same value for 073$a and save the
   bibliographic record.
9. Edit the same record, you should have an empty 009 field and 073$a =
   "9782070424597".
   Click on the 009 field input, it should be automatically filled with
   "151662983"
Comment 2 David Nind 2022-09-11 21:23:47 UTC
Created attachment 140414 [details] [review]
Bug 31536: Add UNIMARC framework plugin to fetch PPN from sudoc.fr

This plugin uses sudoc.fr webservices (isbn2ppn, issn2ppn, ean2ppn) to
search a PPN using ISBN, ISSN or EAN as search criteria.
The plugin expects than ISBN is in 010$a, ISSN is in 011$a and EAN is in
073$a.

Test plan:
1. Configure the default MARC framework so that 009 uses this plugin
   (unimarc_field_009_ppn.pl)
2. Start creating a new bibliographic record
3. In the editor, write "0195141156" in the 010$a input, then move the
   focus out of the input (by pressing Tab, or clicking elsewhere on the
   page)
   The 009 field should be automatically filled with "06735209X"
4. Empty the 010$a input, then empty the 009 input
5. Write "2262-4694" in the 011$a input, then move the focus out of the
   input
   The 009 field should be automatically filled with "166197947"
6. Empty the 011$a input, then empty the 009 input
7. Write "9782070424597" in the 073$a input, then move the focus out of
   the input
   The 009 field should be automatically filled with "151662983"
8. Empty only the 009 field, keep the same value for 073$a and save the
   bibliographic record.
9. Edit the same record, you should have an empty 009 field and 073$a =
   "9782070424597".
   Click on the 009 field input, it should be automatically filled with
   "151662983"

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2022-09-11 21:28:41 UTC
Testing notes (using koha-testing-docker):

- For step 1:
  . added the 009 tag (called it 'Test 009') 
  . added a subfield (x) labeled 'Test' and selected the plugin unimarc_field_009_ppn.pl

Everything worked as per the test plan.
Comment 4 Katrin Fischer 2022-10-03 21:26:27 UTC
Created attachment 141291 [details] [review]
Bug 31536: Add UNIMARC framework plugin to fetch PPN from sudoc.fr

This plugin uses sudoc.fr webservices (isbn2ppn, issn2ppn, ean2ppn) to
search a PPN using ISBN, ISSN or EAN as search criteria.
The plugin expects than ISBN is in 010$a, ISSN is in 011$a and EAN is in
073$a.

Test plan:
1. Configure the default MARC framework so that 009 uses this plugin
   (unimarc_field_009_ppn.pl)
2. Start creating a new bibliographic record
3. In the editor, write "0195141156" in the 010$a input, then move the
   focus out of the input (by pressing Tab, or clicking elsewhere on the
   page)
   The 009 field should be automatically filled with "06735209X"
4. Empty the 010$a input, then empty the 009 input
5. Write "2262-4694" in the 011$a input, then move the focus out of the
   input
   The 009 field should be automatically filled with "166197947"
6. Empty the 011$a input, then empty the 009 input
7. Write "9782070424597" in the 073$a input, then move the focus out of
   the input
   The 009 field should be automatically filled with "151662983"
8. Empty only the 009 field, keep the same value for 073$a and save the
   bibliographic record.
9. Edit the same record, you should have an empty 009 field and 073$a =
   "9782070424597".
   Click on the 009 field input, it should be automatically filled with
   "151662983"

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Tomás Cohen Arazi 2022-10-05 19:04:43 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!