Bug 30430

Summary: UNIMARC XSLT : displaying field B_214
Product: Koha Reporter: François Pichenot <fpichenot>
Component: MARC Bibliographic data supportAssignee: François Pichenot <fpichenot>
Status: RESOLVED FIXED QA Contact: Fridolin Somers <fridolin.somers>
Severity: enhancement    
Priority: P5 - low CC: arthur.suzuki, aude.charillon, david, fridolin.somers, lucas, severine.queune, thibault.keromnes
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23702
Change sponsored?: --- Patch complexity: Medium patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00
Attachments: Bug 30430: UNIMARC XSLT add field B214 display
Bug 30430: UNIMARC XSLT add field B214 display
Bug 30430: UNIMARC XSLT add field B214 display
Bug 30430: UNIMARC XSLT add field B214 display
Bug 30430: UNIMARC XSLT add field B214 display
Bug 30430 : (QA follow-up) fix display of 210 only if no 214 + added 214r/s
example record
Bug 30430: UNIMARC XSLT add field B214 display
Bug 30430 : (QA follow-up) fix display of 210 only if no 214 + added 214r/s
Bug 30430: UNIMARC XSLT add field B214 display
Bug 30430: (QA follow-up) fix display of 210 only if no 214 + added 214r/s
Bug 30430: (QA follow-up) Several fixes
Bug 30430: UNIMARC XSLT add field B214 display
Bug 30430: (QA follow-up) fix display of 210 only if no 214 + added 214r/s
Bug 30430: (QA follow-up) Several fixes

Description François Pichenot 2022-04-01 09:37:11 UTC
We need to update XSLT files to display new UNIMARC B_214 field.
See https://cdn.ifla.org/wp-content/uploads/files/assets/uca/unimarc_updates/BIBLIOGRAPHIC/u_b_214_update2019_online_final.pdf
Comment 1 Arthur Suzuki 2022-04-01 11:33:16 UTC
Created attachment 132842 [details] [review]
Bug 30430: UNIMARC XSLT add field B214 display

test plan :
- Apply patch
- Find a record with a B214
- Check on both Opac-Details and Opac-Result that the field is displayed.
- Do the same checks on catalogue/search results and catalogue/details
in Staff interface.
Comment 2 François Pichenot 2022-04-01 12:53:01 UTC
Created attachment 132864 [details] [review]
Bug 30430: UNIMARC XSLT add field B214 display

test plan :
- Apply patch
- Find a record with a B214
- Check on both Opac-Details and Opac-Result that the field is displayed.
- Do the same checks on catalogue/search results and catalogue/details
in Staff interface.
Comment 3 Arthur Suzuki 2022-04-01 19:33:59 UTC
Created attachment 132872 [details] [review]
Bug 30430: UNIMARC XSLT add field B214 display

test plan :
- Apply patch
- Find a record with a B214
- Check on both Opac-Details and Opac-Result that the field is displayed.
- Do the same checks on catalogue/search results and catalogue/details
in Staff interface.
Comment 4 François Pichenot 2022-04-13 11:32:03 UTC
Created attachment 133235 [details] [review]
Bug 30430: UNIMARC XSLT add field B214 display

test plan :
- Apply patch
- Find a record with a B214
- Check on both Opac-Details and Opac-Result that the field is
  displayed.
- Do the same checks on catalogue/search results and catalogue/details
  in Staff interface.
Comment 5 Arthur Suzuki 2022-05-03 21:40:51 UTC
Created attachment 134560 [details] [review]
Bug 30430: UNIMARC XSLT add field B214 display

test plan :
- Apply patch
- Find a record with a B214
- Check on both Opac-Details and Opac-Result that the field is
  displayed.
- Do the same checks on catalogue/search results and catalogue/details
  in Staff interface.
- Add a 210 field to the record (legacy)
- It should be displayed as well
Comment 6 Arthur Suzuki 2022-05-03 22:13:30 UTC
rebasé sur master + affichage du 210 (ancien) en plus du 214 (pour rétrocompatibilité)
Comment 7 Arthur Suzuki 2022-05-05 15:33:57 UTC
Created attachment 134652 [details] [review]
Bug 30430 : (QA follow-up) fix display of 210 only if no 214 + added 214r/s
Comment 8 Arthur Suzuki 2022-05-05 15:35:03 UTC
Created attachment 134653 [details]
example record
Comment 9 David Nind 2022-05-05 23:09:49 UTC
Created attachment 134667 [details] [review]
Bug 30430: UNIMARC XSLT add field B214 display

test plan :
- Apply patch
- Find a record with a B214
- Check on both Opac-Details and Opac-Result that the field is
  displayed.
- Do the same checks on catalogue/search results and catalogue/details
  in Staff interface.
- Add a 210 field to the record (legacy)
- It should be displayed as well

Signed-off-by: David Nind <david@davidnind.com>
Comment 10 David Nind 2022-05-05 23:09:55 UTC
Created attachment 134668 [details] [review]
Bug 30430 : (QA follow-up) fix display of 210 only if no 214 + added 214r/s

Signed-off-by: David Nind <david@davidnind.com>
Comment 11 David Nind 2022-05-05 23:10:47 UTC
Thanks Arthur for providing a sample record - that made it much easier to test!
Comment 12 Katrin Fischer 2022-05-06 09:42:26 UTC
Can you explain how to catalog a B214? (Why the B and not just 214?)
Comment 13 Arthur Suzuki 2022-05-11 08:57:36 UTC
Hi david,
thx for the signoff, actually, the mrc file has been provided by Severine Queune, I've just uploaded it to bugzilla.

Hi Katrin,
actually the bz title may be wrong, it displays any 214 fields.
Have a look at the attached record for some examples.

Maybe François can confirm that "b214" is a naming convention for "a 214 field"?

Arthur
Comment 14 Séverine Queune 2022-05-11 09:59:58 UTC
Ha (In reply to Katrin Fischer from comment #12)
> Can you explain how to catalog a B214? (Why the B and not just 214?)

Hi Katrin !
'B_xxx' is means 'bibliographic'.
It's quite an automatism that we have to precede the name of the field in order not to confuse it with the same number field of the authorities which would be 'A_xxx'.
So in that case, saying 'field 214' works fine too :)

> (In reply to David Nind from comment #11)
> > Thanks Arthur for providing a sample record - that made it much easier to
> > test!
(In reply to Arthur Suzuki from comment #13)
> Hi david,
> thx for the signoff, actually, the mrc file has been provided by Severine
> Queune, I've just uploaded it to bugzilla.

Thank you for testing David ! I didn't because the code partially comes the BULAC stylesheet, I don't think it would be fair signing it :)
Comment 15 Fridolin Somers 2022-06-30 04:56:01 UTC
Created attachment 136758 [details] [review]
Bug 30430: UNIMARC XSLT add field B214 display

test plan :
- Apply patch
- Find a record with a B214
- Check on both Opac-Details and Opac-Result that the field is
  displayed.
- Do the same checks on catalogue/search results and catalogue/details
  in Staff interface.
- Add a 210 field to the record (legacy)
- It should be displayed as well

Signed-off-by: David Nind <david@davidnind.com>
Comment 16 Fridolin Somers 2022-06-30 04:56:06 UTC
Created attachment 136759 [details] [review]
Bug 30430: (QA follow-up) fix display of 210 only if no 214 + added 214r/s

Signed-off-by: David Nind <david@davidnind.com>
Comment 17 Fridolin Somers 2022-06-30 04:56:10 UTC
Created attachment 136760 [details] [review]
Bug 30430: (QA follow-up) Several fixes

Several fixes :

- Replace tab with spaces

tag_210 :
- Class 'value' and not 'valeur'
- Loop on subfields must restrict to abcdg otherwise last() may not be
  correct (ie 214r and 214s)

tag_214 :
- Condition for coma after b should be same as after a : "position() != last()"

tag_210 and tag_214 :
- Space before ':' like in other fields
- ':' before c or g does not exist in opac, removed from intranet file
- Search links in intranet fixed (where composed with opac-search ^^)
- Search links using 'str:encode-uri' like other places
- Simplify title attribute with only 'Search for publisher' => Bad idea
  to use double quotes in a text

tag_214_s and tag_214_r :
- Loop on field+subfield otherwise last() may not be correct

I've fixed intranet and copied to OPAC (only adapted search links)
Comment 18 Fridolin Somers 2022-06-30 05:05:28 UTC
I've tested with example record.
with 210
with both 214 and 210
with 214 missing some subfields :
  214abcd
  214bcd
  214cd
  214abc
  214ab
  214a
  214c
  214d

Found a lot of real bugs and some optimizations.

I passe QA.
Comment 19 Fridolin Somers 2022-06-30 05:05:54 UTC
Created attachment 136761 [details] [review]
Bug 30430: UNIMARC XSLT add field B214 display

test plan :
- Apply patch
- Find a record with a B214
- Check on both Opac-Details and Opac-Result that the field is
  displayed.
- Do the same checks on catalogue/search results and catalogue/details
  in Staff interface.
- Add a 210 field to the record (legacy)
- It should be displayed as well

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Comment 20 Fridolin Somers 2022-06-30 05:05:59 UTC
Created attachment 136762 [details] [review]
Bug 30430: (QA follow-up) fix display of 210 only if no 214 + added 214r/s

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Comment 21 Fridolin Somers 2022-06-30 05:06:04 UTC
Created attachment 136763 [details] [review]
Bug 30430: (QA follow-up) Several fixes

Several fixes :

- Replace tab with spaces

tag_210 :
- Class 'value' and not 'valeur'
- Loop on subfields must restrict to abcdg otherwise last() may not be
  correct (ie 214r and 214s)

tag_214 :
- Condition for coma after b should be same as after a : "position() != last()"

tag_210 and tag_214 :
- Space before ':' like in other fields
- ':' before c or g does not exist in opac, removed from intranet file
- Search links in intranet fixed (where composed with opac-search ^^)
- Search links using 'str:encode-uri' like other places
- Simplify title attribute with only 'Search for publisher' => Bad idea
  to use double quotes in a text

tag_214_s and tag_214_r :
- Loop on field+subfield otherwise last() may not be correct

I've fixed intranet and copied to OPAC (only adapted search links)

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Comment 22 Fridolin Somers 2022-06-30 05:07:27 UTC
Great thanks for UNIMARC users ;)
Comment 23 Tomás Cohen Arazi 2022-07-01 19:58:26 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 24 Lucas Gass 2022-08-09 22:02:33 UTC
Enhancement will not be backported to 22.05.x series unless requested.
Comment 25 Arthur Suzuki 2022-08-10 05:28:26 UTC
(In reply to Lucas Gass from comment #24)
> Enhancement will not be backported to 22.05.x series unless requested.

Hi Lucas,
It would be great to have this in 22.05.x.
This way our partners at BibLibre could benefit from this bug they helped to work on in a reasonable delay.
I could also backport to 21.11.x.
Thanks in advance,
Arthur
Comment 26 Aude Charillon 2023-07-28 09:32:03 UTC
Checked Manual; no changes needed.