Bug 18198

Summary: MARC21: Further improve handling of 5XX$u in GetMarcNotes
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: MARC Bibliographic data supportAssignee: Marcel de Rooy <m.de.rooy>
Status: CLOSED FIXED QA Contact: Josef Moravec <josef.moravec>
Severity: enhancement    
Priority: P5 - low CC: jonathan.druart, josef.moravec, nick
Version: MainKeywords: Academy
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14306
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 18198: MARC21: Further improve handling of 5XX$u in GetMarcNotes
Bug 18198: MARC21: Further improve handling of 5XX$u in GetMarcNotes
Bug 18198: MARC21: Further improve handling of 5XX$u in GetMarcNotes
Bug 18198: (QA follow-up) Add tests for GetMarcNotes

Description Marcel de Rooy 2017-03-02 11:58:54 UTC
This actually is a follow-up of bug 14306.
That report only touched field 555 in MARC21. But a lot of other 5XX fields have a $u subfield for URIs.
This patch generalizes the change made for 555 and extends it to all 5XX $u.
Comment 1 Marcel de Rooy 2017-03-02 12:10:02 UTC
Created attachment 60790 [details] [review]
Bug 18198: MARC21: Further improve handling of 5XX$u in GetMarcNotes

Bug 14306 only handled field 555 in MARC21 as an URI. But a lot of other
5XX fields have a $u subfield for URIs; actually $u is not used in any
other way. This patch generalizes the change made for 555 and extends
it to all 5XX $u.

Test plan:
[1] Run t/Biblio.t
[2] Run t/db_dependent/Biblio.t
[3] Edit a MARC21 record. Add a URL into 505u, 520u, 555u.
[4] Check presentation on opac-detail (tab Title notes)
[5] Check presentation on catalogue/detail (tab Descriptions)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 2 Katrin Fischer 2017-10-15 13:54:40 UTC
Created attachment 68170 [details] [review]
Bug 18198: MARC21: Further improve handling of 5XX$u in GetMarcNotes

Bug 14306 only handled field 555 in MARC21 as an URI. But a lot of other
5XX fields have a $u subfield for URIs; actually $u is not used in any
other way. This patch generalizes the change made for 555 and extends
it to all 5XX $u.

Test plan:
[1] Run t/Biblio.t
[2] Run t/db_dependent/Biblio.t
[3] Edit a MARC21 record. Add a URL into 505u, 520u, 555u.
[4] Check presentation on opac-detail (tab Title notes)
[5] Check presentation on catalogue/detail (tab Descriptions)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 3 Marcel de Rooy 2017-10-16 06:23:42 UTC
(In reply to Katrin Fischer from comment #2)
> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Thanks !
Comment 4 Josef Moravec 2018-01-26 09:15:54 UTC
Created attachment 70941 [details] [review]
Bug 18198: MARC21: Further improve handling of 5XX$u in GetMarcNotes

Bug 14306 only handled field 555 in MARC21 as an URI. But a lot of other
5XX fields have a $u subfield for URIs; actually $u is not used in any
other way. This patch generalizes the change made for 555 and extends
it to all 5XX $u.

Test plan:
[1] Run t/Biblio.t
[2] Run t/db_dependent/Biblio.t
[3] Edit a MARC21 record. Add a URL into 505u, 520u, 555u.
[4] Check presentation on opac-detail (tab Title notes)
[5] Check presentation on catalogue/detail (tab Descriptions)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 5 Marcel de Rooy 2018-01-26 09:16:48 UTC
(In reply to Josef Moravec from comment #4)
> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Great
Comment 6 Jonathan Druart 2018-01-30 18:42:12 UTC
Please provide tests.
Comment 7 Marcel de Rooy 2018-01-31 12:57:50 UTC
Created attachment 71085 [details] [review]
Bug 18198: (QA follow-up) Add tests for GetMarcNotes

As requested by the RM, this patch adds a separate unit test
for GetMarcNotes. We test MARC21 and UNIMARC. The NotesBlacklist pref
is tested and also handling URLs in 5XX$u for MARC21.

Test plan:
Run t/Biblio/GetMarcNotes.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 8 Jonathan Druart 2018-02-02 15:10:57 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 9 Nick Clemens (kidclamp) 2018-02-16 00:38:07 UTC
Awesome work all! Enhancement not backported to stable.