Bug 19616 - Add MARC21 505$g - Formatted Contents Note / Miscellaneous information
Summary: Add MARC21 505$g - Formatted Contents Note / Miscellaneous information
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Katrin Fischer
QA Contact: Tomás Cohen Arazi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-13 14:51 UTC by verolencinas
Modified: 2020-11-09 20:38 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Text to go in the release notes:
Version(s) released in:
20.11.00


Attachments
Example (6.69 KB, application/octet-stream)
2018-11-30 16:00 UTC, verolencinas
Details
Bug 19616: Add MARC21 505$g - Formatted Contents Note / Miscellaneous informatoin (2.88 KB, patch)
2020-09-13 22:47 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 19616: (follow-up) Reindent XSLT code used for 505 display (5.40 KB, patch)
2020-09-13 22:47 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 19616: (follow-up) Breaking items according to punctuation (8.09 KB, patch)
2020-09-13 23:38 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 19616: Add MARC21 505$g - Formatted Contents Note / Miscellaneous informatoin (2.93 KB, patch)
2020-09-16 15:17 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19616: (follow-up) Reindent XSLT code used for 505 display (5.46 KB, patch)
2020-09-16 15:17 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19616: (follow-up) Breaking items according to punctuation (8.12 KB, patch)
2020-09-16 15:17 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19616: Add MARC21 505$g - Formatted Contents Note / Miscellaneous informatoin (2.99 KB, patch)
2020-10-07 18:34 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 19616: (follow-up) Reindent XSLT code used for 505 display (5.51 KB, patch)
2020-10-07 18:34 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 19616: (follow-up) Breaking items according to punctuation (8.18 KB, patch)
2020-10-07 18:34 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description verolencinas 2017-11-13 14:51:51 UTC
The 505 field in Marc 21, Formatted Contents Note, includes subfield g "Miscellaneous information". According to the Marc 21 format for bibliographic data, it is used to record "volume, part, page numbering or other extent information such as dates". If you use it in Koha, this information isn't visible in the OPAC.
Comment 1 verolencinas 2018-11-30 16:00:15 UTC
Created attachment 82798 [details]
Example

Example file in MARC21 format (in spanish)
Comment 2 verolencinas 2018-11-30 16:05:32 UTC
OPAC View (incomplete from example file):
Contenidos:
-> Universidad Nacional de Córdoba / Jorge B. Pilcher. Facultad de Derecho.
-> [Estudiantes en el remate del portal del rectorado de la UNC].
-> Claustro Universidad Nacional de Córdoba / Jorge B. Pilcher.
-> Interior Universidad Nacional de Córdoba / Jorge B. Pilcher.
-> Salón de Grados de la Universidad / Santiago Troisi.
...

Should be viewed as
Contenidos:
-> Postales: 1/46. Universidad Nacional de Córdoba / Jorge B. Pilcher. [1880?].
-> 2/46. Facultad de Derecho. [1905?].
-> 3/46. [Estudiantes en el remate del portal del rectorado de la UNC]. [1918].
-> 4/46. Claustro Universidad Nacional de Córdoba / Jorge B. Pilcher. [1880?].
-> 5/46. Interior Universidad Nacional de Córdoba / Jorge B. Pilcher. [1880?].
-> 6/46. Salón de Grados de la Universidad / Santiago Troisi. 1903.
Comment 3 Tomás Cohen Arazi 2020-03-13 11:50:18 UTC
(In reply to verolencinas from comment #0)
> The 505 field in Marc 21, Formatted Contents Note, includes subfield g
> "Miscellaneous information". According to the Marc 21 format for
> bibliographic data, it is used to record "volume, part, page numbering or
> other extent information such as dates". If you use it in Koha, this
> information isn't visible in the OPAC.

Verónica, this should be dependent on ind2=0, right? What about $u?
Comment 4 Katrin Fischer 2020-09-13 22:47:48 UTC
Created attachment 110027 [details] [review]
Bug 19616: Add MARC21 505$g - Formatted Contents Note / Miscellaneous informatoin

This adds the subfield $g to the display of the 505 field in
staff and OPAC detail pages.

To test:
- Catalog some records using variations of 505
  Examples can be found in the LOC documentation:
  https://www.loc.gov/marc/bibliographic/bd505.html
- Verify that the display in staff and OPAC is still nice
  and now includes $g
Comment 5 Katrin Fischer 2020-09-13 22:47:53 UTC
Created attachment 110028 [details] [review]
Bug 19616: (follow-up) Reindent XSLT code used for 505 display

Also adds a note at the beginning of the code block.
This causes no functional change, just code clean-up.
Comment 6 Katrin Fischer 2020-09-13 22:51:28 UTC
This doesn't quite work yet, behaviour of line breaks needs to be changed.
Comment 7 Katrin Fischer 2020-09-13 23:38:06 UTC
Created attachment 110029 [details] [review]
Bug 19616: (follow-up) Breaking items according to punctuation

Previously the code assumed that $t indicates a new line in the
listing. But this is not true. The standard tells us that -- or
.-- will indicate a new item.

"In records formulated according to AACR 2, a space-hyphen-hyphen-space
( -- ) is recorded between each item in the contents note unless a
delimiter/subfield code follows in which case there is no ending space.
In pre-AACR 2 records, items are separated by a period-hyphen-hyphen (.--)."

The previous logic did no longer work with $g added. From the LOC
examples:

This would work:
505 2 0 $tBaptisms, 1816-1872 --$tChurch members, 1816-1831 --$tHistory of the Second Presbyterian Church of West Durham /$rby L. H. Fellows.
505 0 0 $tQuatrain II$g(16:35) --$tWater ways$g(1:57) --$tWaves$g(10:49).

This wouldn't:
505 1 0 $gNr. 1.$tRegion Neusiedlersee --$gNr. 2.$tRegion Rosalia/Lithagebirge --$gNr. 3.$tRegion Mettelburgenland --$gNr. 4.$tRegion südliches Burgenland --$gNr. 5.$tRegion Südburgland

With the patches applied, all examples should display nicely now.
Comment 8 Martin Renvoize 2020-09-16 15:17:31 UTC
Created attachment 110215 [details] [review]
Bug 19616: Add MARC21 505$g - Formatted Contents Note / Miscellaneous informatoin

This adds the subfield $g to the display of the 505 field in
staff and OPAC detail pages.

To test:
- Catalog some records using variations of 505
  Examples can be found in the LOC documentation:
  https://www.loc.gov/marc/bibliographic/bd505.html
- Verify that the display in staff and OPAC is still nice
  and now includes $g

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 9 Martin Renvoize 2020-09-16 15:17:36 UTC
Created attachment 110216 [details] [review]
Bug 19616: (follow-up) Reindent XSLT code used for 505 display

Also adds a note at the beginning of the code block.
This causes no functional change, just code clean-up.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 10 Martin Renvoize 2020-09-16 15:17:41 UTC
Created attachment 110217 [details] [review]
Bug 19616: (follow-up) Breaking items according to punctuation

Previously the code assumed that $t indicates a new line in the
listing. But this is not true. The standard tells us that -- or
.-- will indicate a new item.

"In records formulated according to AACR 2, a space-hyphen-hyphen-space
( -- ) is recorded between each item in the contents note unless a
delimiter/subfield code follows in which case there is no ending space.
In pre-AACR 2 records, items are separated by a period-hyphen-hyphen (.--)."

The previous logic did no longer work with $g added. From the LOC
examples:

This would work:
505 2 0 $tBaptisms, 1816-1872 --$tChurch members, 1816-1831 --$tHistory of the Second Presbyterian Church of West Durham /$rby L. H. Fellows.
505 0 0 $tQuatrain II$g(16:35) --$tWater ways$g(1:57) --$tWaves$g(10:49).

This wouldn't:
505 1 0 $gNr. 1.$tRegion Neusiedlersee --$gNr. 2.$tRegion Rosalia/Lithagebirge --$gNr. 3.$tRegion Mettelburgenland --$gNr. 4.$tRegion südliches Burgenland --$gNr. 5.$tRegion Südburgland

With the patches applied, all examples should display nicely now.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 11 Martin Renvoize 2020-09-16 15:18:13 UTC
Works perfectly, Signing off.
Comment 12 Tomás Cohen Arazi 2020-10-07 18:34:06 UTC
Created attachment 111353 [details] [review]
Bug 19616: Add MARC21 505$g - Formatted Contents Note / Miscellaneous informatoin

This adds the subfield $g to the display of the 505 field in
staff and OPAC detail pages.

To test:
- Catalog some records using variations of 505
  Examples can be found in the LOC documentation:
  https://www.loc.gov/marc/bibliographic/bd505.html
- Verify that the display in staff and OPAC is still nice
  and now includes $g

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 13 Tomás Cohen Arazi 2020-10-07 18:34:13 UTC
Created attachment 111354 [details] [review]
Bug 19616: (follow-up) Reindent XSLT code used for 505 display

Also adds a note at the beginning of the code block.
This causes no functional change, just code clean-up.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 14 Tomás Cohen Arazi 2020-10-07 18:34:22 UTC
Created attachment 111355 [details] [review]
Bug 19616: (follow-up) Breaking items according to punctuation

Previously the code assumed that $t indicates a new line in the
listing. But this is not true. The standard tells us that -- or
.-- will indicate a new item.

"In records formulated according to AACR 2, a space-hyphen-hyphen-space
( -- ) is recorded between each item in the contents note unless a
delimiter/subfield code follows in which case there is no ending space.
In pre-AACR 2 records, items are separated by a period-hyphen-hyphen (.--)."

The previous logic did no longer work with $g added. From the LOC
examples:

This would work:
505 2 0 $tBaptisms, 1816-1872 --$tChurch members, 1816-1831 --$tHistory of the Second Presbyterian Church of West Durham /$rby L. H. Fellows.
505 0 0 $tQuatrain II$g(16:35) --$tWater ways$g(1:57) --$tWaves$g(10:49).

This wouldn't:
505 1 0 $gNr. 1.$tRegion Neusiedlersee --$gNr. 2.$tRegion Rosalia/Lithagebirge --$gNr. 3.$tRegion Mettelburgenland --$gNr. 4.$tRegion südliches Burgenland --$gNr. 5.$tRegion Südburgland

With the patches applied, all examples should display nicely now.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 15 Tomás Cohen Arazi 2020-10-07 18:40:31 UTC
I PQA as it does what it was requested. And I guess it doesn't hurt to make it independent on ind2.

I still have my question open about $u (separate enhancement, for sure), and the incidence of ind2=0. I felt like this 'enhanced' formatting/output should be dependent on ind2, but I'm not a MARC expert and I guess if people add the subfields, they expect them to be displayed.
Comment 16 Jonathan Druart 2020-10-08 14:20:33 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 17 Lucas Gass 2020-11-09 20:38:37 UTC
enhancement will not be backported to 20.05.x