Bug 15594 - Sequence of MARC 260 subfields different on XSLT result list and detail page
Summary: Sequence of MARC 260 subfields different on XSLT result list and detail page
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement with 10 votes (vote)
Assignee: Blou
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-19 04:23 UTC by Iming Chan
Modified: 2023-10-18 10:23 UTC (History)
6 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement improves the display of MARC field 260 in the detail page for the OPAC and staff interface by using the order of subfields in the record. Previously, $a$b$a$b would display as aabb.
Version(s) released in:
22.05.00


Attachments
Bug 15594: preserve sequence of 260 subfields in detail page (5.79 KB, patch)
2021-12-06 18:53 UTC, Blou
Details | Diff | Splinter Review
Bug 15594: preserve sequence of 260 subfields in (staff) detail page (5.30 KB, patch)
2021-12-08 21:46 UTC, Blou
Details | Diff | Splinter Review
Bug 15594: preserve sequence of 260 subfields in detail page (5.84 KB, patch)
2022-02-05 22:53 UTC, David Nind
Details | Diff | Splinter Review
Bug 15594: preserve sequence of 260 subfields in (staff) detail page (5.35 KB, patch)
2022-02-05 22:53 UTC, David Nind
Details | Diff | Splinter Review
Bug 15594: Class in now unchanged after the patch (1.69 KB, patch)
2022-03-03 20:13 UTC, The Minh Luong
Details | Diff | Splinter Review
Bug 15594: preserve sequence of 260 subfields in detail page (5.89 KB, patch)
2022-03-04 16:50 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 15594: preserve sequence of 260 subfields in (staff) detail page (5.40 KB, patch)
2022-03-04 16:50 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 15594: Class in now unchanged after the patch (1.74 KB, patch)
2022-03-04 16:50 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 15594: (QA follow-up) Move span to publisher name, fix whitespace, only add spaces once per loop (10.98 KB, patch)
2022-03-04 16:50 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Iming Chan 2016-01-19 04:23:10 UTC
Sequence of MARC 260 subfields different on XSLT result list and detail page (both in staff client and OPAC) when there are repeating subfields $a and/or $b.  

For example:

On MARC cataloguing screen it is entered as:

$aNew York :$bHarperCollins ;$aMelbourne :$bCollins,$c2016

is displayed as:

New York : Melbourne : HarperCollins ; Collins, 2016

It needs to match the order it is entered on the MARC cataloguing screen.
Comment 1 Blou 2021-12-06 18:53:36 UTC
Created attachment 128284 [details] [review]
Bug 15594: preserve sequence of 260 subfields in detail page

When ordered $a$b$a$b$c in the MARC object, 260 subfields are displayed
$a$a$b$b$c.  This goes against the standard.

This patch preserves the order.

0) create a notice with $a$b$a subfields.  In that (mixed) order.
1) Go to detail page and see the fields displayed as "aab"
2) apply the patch
3) validate the aba display.
Comment 2 Blou 2021-12-06 19:09:03 UTC
I was going to create a new ticket, but am happy to have found that someone else already raised the issue (albeit 5 years ago).

I had to dig, being no xslt expert, and finding no other example in the code for that ordering problem.
Comment 3 Blou 2021-12-08 21:46:46 UTC
Created attachment 128369 [details] [review]
Bug 15594: preserve sequence of 260 subfields in (staff) detail page

When ordered $a$b$a$b$c in the MARC object, 260 subfields are displayed
$a$a$b$b$c.  This goes against the standard.

This patch preserves the order.

0) create a notice with $a$b$a subfields.  In that (mixed) order.
1) Go to staff detail page and see the fields displayed as "aab"
2) apply the patch
3) validate the aba display.
Comment 4 Blou 2021-12-09 16:34:13 UTC
Sponsored by: Ville de Saint-Eustache
Comment 5 Katrin Fischer 2021-12-12 17:10:52 UTC
(In reply to Blou from comment #4)
> Sponsored by: Ville de Saint-Eustache

If you add the line as Sponsored-by: to your commit message it will be picked up automatically by the release notes.
Comment 6 David Nind 2022-02-05 22:53:33 UTC
Created attachment 130194 [details] [review]
Bug 15594: preserve sequence of 260 subfields in detail page

When ordered $a$b$a$b$c in the MARC object, 260 subfields are displayed
$a$a$b$b$c.  This goes against the standard.

This patch preserves the order.

0) create a notice with $a$b$a subfields.  In that (mixed) order.
1) Go to detail page and see the fields displayed as "aab"
2) apply the patch
3) validate the aba display.

Signed-off-by: David Nind <david@davidnind.com>
Comment 7 David Nind 2022-02-05 22:53:38 UTC
Created attachment 130195 [details] [review]
Bug 15594: preserve sequence of 260 subfields in (staff) detail page

When ordered $a$b$a$b$c in the MARC object, 260 subfields are displayed
$a$a$b$b$c.  This goes against the standard.

This patch preserves the order.

0) create a notice with $a$b$a subfields.  In that (mixed) order.
1) Go to staff detail page and see the fields displayed as "aab"
2) apply the patch
3) validate the aba display.

Signed-off-by: David Nind <david@davidnind.com>
Comment 8 Nick Clemens 2022-02-18 20:37:14 UTC
the span with typeOf Organization is changed after this patch, I am not sure what is supposed to be inside of that span - just the 'a'? or the 'a' and 'b'?
Comment 9 Katrin Fischer 2022-02-19 00:08:45 UTC
I believe only the publisher's name in this case?
Comment 10 The Minh Luong 2022-03-03 20:13:06 UTC
Created attachment 131363 [details] [review]
Bug 15594: Class in now unchanged after the patch

I'm not sure if this is the actual issue, but I found that the patch puts the span with
the class "publisher_name" inside a new span with typeOf="Organization".

In this patch, I removed that new span, to keep it coherent with the previous code.
Also, the MARC 260 subfields are displayed correctly !
Comment 11 Nick Clemens 2022-03-04 16:50:06 UTC
Created attachment 131382 [details] [review]
Bug 15594: preserve sequence of 260 subfields in detail page

When ordered $a$b$a$b$c in the MARC object, 260 subfields are displayed
$a$a$b$b$c.  This goes against the standard.

This patch preserves the order.

0) create a notice with $a$b$a subfields.  In that (mixed) order.
1) Go to detail page and see the fields displayed as "aab"
2) apply the patch
3) validate the aba display.

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 12 Nick Clemens 2022-03-04 16:50:11 UTC
Created attachment 131383 [details] [review]
Bug 15594: preserve sequence of 260 subfields in (staff) detail page

When ordered $a$b$a$b$c in the MARC object, 260 subfields are displayed
$a$a$b$b$c.  This goes against the standard.

This patch preserves the order.

0) create a notice with $a$b$a subfields.  In that (mixed) order.
1) Go to staff detail page and see the fields displayed as "aab"
2) apply the patch
3) validate the aba display.

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 13 Nick Clemens 2022-03-04 16:50:15 UTC
Created attachment 131384 [details] [review]
Bug 15594: Class in now unchanged after the patch

I'm not sure if this is the actual issue, but I found that the patch puts the span with
the class "publisher_name" inside a new span with typeOf="Organization".

In this patch, I removed that new span, to keep it coherent with the previous code.
Also, the MARC 260 subfields are displayed correctly !

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 14 Nick Clemens 2022-03-04 16:50:18 UTC
Created attachment 131385 [details] [review]
Bug 15594: (QA follow-up) Move span to publisher name, fix whitespace, only add spaces once per loop

This patch updates the whitespace for readbility
Moves the Ogranization span to the subfield b, publisher name only
Moves check for last/whitespace to the loop

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 15 Nick Clemens 2022-03-04 16:50:46 UTC
Small patch, small cleanup, I think this can go ahead PQA
Comment 16 Fridolin Somers 2022-03-09 09:06:54 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄