Bug 10265 - 8xx serial added entries need spaces and punctuation in XSLT display
Summary: 8xx serial added entries need spaces and punctuation in XSLT display
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Bibliographic data support (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Katrin Fischer
QA Contact: Joonas Kylmälä
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-17 02:14 UTC by Nicole C. Engard
Modified: 2022-06-06 20:24 UTC (History)
5 users (show)

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


Attachments
series display (54.21 KB, image/png)
2013-05-17 02:14 UTC, Nicole C. Engard
Details
marc for 830 (32.70 KB, image/png)
2013-05-17 02:14 UTC, Nicole C. Engard
Details
Bug 10265: Add missing spaces between label and content in XSLT view (780/785) (2.67 KB, patch)
2013-05-19 10:17 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 10265: Keep punctuation for 8xx series added entry fields (MARC21) (5.86 KB, patch)
2021-08-24 10:56 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 10265: Keep punctuation for 8xx series added entry fields (MARC21) (5.92 KB, patch)
2021-08-27 02:51 UTC, Hayley Pelham
Details | Diff | Splinter Review
Bug 10265: Keep punctuation for 8xx series added entry fields (MARC21) (6.05 KB, patch)
2021-09-05 12:16 UTC, Joonas Kylmälä
Details | Diff | Splinter Review
Bug 10265: (QA follow-up) Make if-else checks consistent (2.96 KB, patch)
2021-09-05 12:16 UTC, Joonas Kylmälä
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nicole C. Engard 2013-05-17 02:14:36 UTC
Created attachment 18179 [details]
series display

The subfields of the 830 are showing up without spaces in the series tag on the opac. See attached
Comment 1 Nicole C. Engard 2013-05-17 02:14:53 UTC
Created attachment 18180 [details]
marc for 830
Comment 2 Owen Leonard 2013-05-17 15:23:16 UTC
I can reproduce this in master in both the OPAC and staff client but where this is happening in the xsl file I do not know.
Comment 3 Katrin Fischer 2013-05-19 10:17:47 UTC Comment hidden (obsolete)
Comment 4 Nicole C. Engard 2013-05-19 13:59:51 UTC
This patch doesn't solve the problem of the 830.  Applied and both the staff and the OPAC have the spaces still missing.
Comment 5 Katrin Fischer 2013-05-19 20:05:33 UTC
Nicole, I attached the patch to the wrong bug - still working on this one.
Comment 6 Katrin Fischer 2013-05-19 20:06:48 UTC
Comment on attachment 18239 [details] [review]
Bug 10265: Add missing spaces between label and content in XSLT view (780/785)

>From 0a9055d0c36ef12d19da91b970f725dba2f6a6b5 Mon Sep 17 00:00:00 2001
>From: Katrin Fischer <Katrin.Fischer.83@web.de>
>Date: Sun, 19 May 2013 12:16:16 +0200
>Subject: [PATCH] Bug 10265: Add missing spaces between label and content in
> XSLT view (780/785)
>
>To test:
>- Check OPAC and intranet XSLT view for a record that contains
>  780 and 785 fields.
>- Verify there is no space between the label and the content of the
>  field.
>- Apply patch.
>- Verify the display both in intranet and OPAC is a little nicer now.
>---
> .../prog/en/xslt/MARC21slim2intranetDetail.xsl     |    3 ++-
> .../prog/en/xslt/MARC21slim2OPACDetail.xsl         |    3 ++-
> 2 files changed, 4 insertions(+), 2 deletions(-)
>
>diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl
>index aeaa797..98d5742 100644
>--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl
>+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl
>@@ -741,6 +741,7 @@
>             <span class="label">Separated from:</span>
>         </xsl:when>
>         </xsl:choose>
>+        <xsl:text> </xsl:text>
>                 <xsl:variable name="f780">
>                     <xsl:call-template name="subfieldSelect">
>                         <xsl:with-param name="codes">at</xsl:with-param>
>@@ -800,8 +801,8 @@
>         <xsl:when test="@ind2=8">
>             <span class="label">Changed back to:</span>
>         </xsl:when>
>-
>         </xsl:choose>
>+        <xsl:text> </xsl:text>
>                    <xsl:variable name="f785">
>                     <xsl:call-template name="subfieldSelect">
>                         <xsl:with-param name="codes">at</xsl:with-param>
>diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl
>index 5130e8b..e1e6546 100644
>--- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl
>+++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl
>@@ -847,6 +847,7 @@
>             <span class="label">Separated from:</span>
>         </xsl:when>
>         </xsl:choose>
>+        <xsl:text> </xsl:text>
>                 <xsl:variable name="f780">
>                     <xsl:call-template name="subfieldSelect">
>                         <xsl:with-param name="codes">a_t</xsl:with-param>
>@@ -907,8 +908,8 @@
>         <xsl:when test="@ind2=8">
>             <span class="label">Changed back to:</span>
>         </xsl:when>
>-
>         </xsl:choose>
>+        <xsl:text> </xsl:text>
>                    <xsl:variable name="f785">
>                     <xsl:call-template name="subfieldSelect">
>                         <xsl:with-param name="codes">a_t</xsl:with-param>
>-- 
>1.7.9.5
Comment 7 Katrin Fischer 2013-05-22 06:35:21 UTC
Some notes for reproducing this:
- you need to make p and n visible in the MARC editor, to make it possible 
  to catalog the attached example.
- You also have to make sure you have a matching 490 field with the 
  first indicator = 1, else the information is pulled from the 490 field.
Comment 8 Katrin Fischer 2013-05-22 06:37:47 UTC
The problem is somewhere in the part template that deals with the n and p subfields.
Comment 9 Katrin Fischer 2013-05-22 06:46:42 UTC
Do we only want spaces? Or is there some other punctuation needed between those fields?
Comment 10 Nicole C. Engard 2013-05-22 13:41:45 UTC
Spaces should be sufficient, the cataloger should have entered the other punctuation: http://www.loc.gov/marc/bibliographic/bd830.html
Comment 11 Katrin Fischer 2013-05-22 13:55:34 UTC
The function chops off the other punctuation as far as I can see...
Comment 12 Katrin Fischer 2013-05-22 13:57:21 UTC
I will do some testing, it's a pretty old part of the XSLT code, maybe we can just do it completely different now.
Comment 13 Katrin Fischer 2013-06-16 06:53:46 UTC
I don't have time to work on this right now - maybe someone else wants to take it on.
Comment 14 Katrin Fischer 2018-05-31 21:21:24 UTC
I tried and failed... maybe someone else want to give it a try?
Comment 15 Katrin Fischer 2021-08-24 10:56:41 UTC
Created attachment 124060 [details] [review]
Bug 10265: Keep punctuation for 8xx series added entry fields (MARC21)

At the moment the punctuation entered for $n $p and is
removed in the part template, which leads to displaying the subfields
without any punctuation and spaces in between.

To test:
- Catalog records with various combinations of 8xx series added
  entry fields. Subfield a, t, n, p and v are the most important.
- Verify the display in OPAC and staff is not great.
- Apply the patch.
- Verify the display in OPAC and staff is improved.

For examples see:
https://www.loc.gov/marc/bibliographic/bd80x83x.html

Important note: At the moment 8xx series added entry fields will only display, when
there is also a 490 ind. 1 = 1 field present.
Comment 16 Hayley Pelham 2021-08-27 02:51:28 UTC
Created attachment 124129 [details] [review]
Bug 10265: Keep punctuation for 8xx series added entry fields (MARC21)

At the moment the punctuation entered for $n $p and is
removed in the part template, which leads to displaying the subfields
without any punctuation and spaces in between.

To test:
- Catalog records with various combinations of 8xx series added
  entry fields. Subfield a, t, n, p and v are the most important.
- Verify the display in OPAC and staff is not great.
- Apply the patch.
- Verify the display in OPAC and staff is improved.

For examples see:
https://www.loc.gov/marc/bibliographic/bd80x83x.html

Important note: At the moment 8xx series added entry fields will only display, when
there is also a 490 ind. 1 = 1 field present.

Signed-off-by: Hayley Pelham <hayleypelham@catalyst.net.nz>
Comment 17 Katrin Fischer 2021-08-28 12:46:02 UTC
Thank you, Hayley!
Comment 18 Joonas Kylmälä 2021-09-05 12:16:18 UTC
Created attachment 124513 [details] [review]
Bug 10265: Keep punctuation for 8xx series added entry fields (MARC21)

At the moment the punctuation entered for $n $p and is
removed in the part template, which leads to displaying the subfields
without any punctuation and spaces in between.

To test:
- Catalog records with various combinations of 8xx series added
  entry fields. Subfield a, t, n, p and v are the most important.
- Verify the display in OPAC and staff is not great.
- Apply the patch.
- Verify the display in OPAC and staff is improved.

For examples see:
https://www.loc.gov/marc/bibliographic/bd80x83x.html

Important note: At the moment 8xx series added entry fields will only display, when
there is also a 490 ind. 1 = 1 field present.

Signed-off-by: Hayley Pelham <hayleypelham@catalyst.net.nz>

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Comment 19 Joonas Kylmälä 2021-09-05 12:16:21 UTC
Created attachment 124514 [details] [review]
Bug 10265: (QA follow-up) Make if-else checks consistent

The != '' version doesn't check for the whitespace existing and thus
might have added the punctuation without the partNumber or partName being
inserted at all.

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Comment 20 Jonathan Druart 2021-09-09 09:00:33 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 21 Kyle M Hall (khall) 2021-09-10 12:09:59 UTC
Pushed to 21.05.x for 21.05.04
Comment 22 Fridolin Somers 2021-09-16 07:54:35 UTC
Pushed to 20.11.x for 20.11.10
Comment 23 Victor Grousset/tuxayo 2021-09-20 11:58:08 UTC
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.