Bug 34020

Summary: Sequence of MARC 264 subfields different on XSLT result list and detail page
Product: Koha Reporter: Hugo Agud <hagud>
Component: MARC Bibliographic data supportAssignee: Nick Clemens (kidclamp) <nick>
Status: CLOSED FIXED QA Contact: Martin Renvoize (ashimema) <martin.renvoize>
Severity: enhancement    
Priority: P5 - low CC: fridolin.somers, martin.renvoize, nick
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15594
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00
Circulation function:
Attachments: Bug 34020: Preserve order of subfields in 264 display
Bug 34020: Add spans to subfields
Bug 34020: Preserve order of subfields in 264 display
Bug 34020: Add spans to subfields
Bug 34020: Preserve order of subfields in 264 display
Bug 34020: Add spans to subfields
Bug 34020: (QA follow-up) Indentation fix

Description Hugo Agud 2023-06-15 10:58:31 UTC
Related: 15594

MArc260 has been replaced by 264 (RDA) and the improvement of xslt display for 260 has not been moved to 264

As it happened with 260, now 264 is a repeteable field, but it displays in the wrong way in OPAC and staff xslt

copied from bug 15594
Sequence of MARC 264 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 Nick Clemens (kidclamp) 2023-10-18 12:34:17 UTC
Created attachment 157307 [details] [review]
Bug 34020: Preserve order of subfields in 264 display

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

This patch preserves the order.

1) Edit a record and add/update a 264 fields to have subfields a, b, a, b, c in that order
1) Search for record in staff and opac, see subfields displayed in order "aabbc" in results
2) View the details page for the record in staff and opac, note same order
3) Apply the patch, restart all
4) Confirm staff and opac, results and details now follow the order of the subfields in the record's field
Comment 2 Nick Clemens (kidclamp) 2023-10-18 12:34:19 UTC
Created attachment 157308 [details] [review]
Bug 34020: Add spans to subfields

The 260 field has spans for each subfield, we should provide the same for 264

To test:
1 - Apply patch
2 - Inspect the record 264 display on staff and opac, results and details
3 - Confirm spans are constructed correctly and named sensibly
Comment 3 Owen Leonard 2023-10-18 13:02:21 UTC
Created attachment 157313 [details] [review]
Bug 34020: Preserve order of subfields in 264 display

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

This patch preserves the order.

1) Edit a record and add/update a 264 fields to have subfields a, b, a,
   b, c in that order
1) Search for record in staff and opac, see subfields displayed in
   order "aabbc" in results
2) View the details page for the record in staff and opac, note same
   order
3) Apply the patch, restart all
4) Confirm staff and opac, results and details now follow the order of
   the subfields in the record's field

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 4 Owen Leonard 2023-10-18 13:02:23 UTC
Created attachment 157314 [details] [review]
Bug 34020: Add spans to subfields

The 260 field has spans for each subfield, we should provide the same
for 264

To test:
1 - Apply patch
2 - Inspect the record 264 display on staff and opac, results and
    details
3 - Confirm spans are constructed correctly and named sensibly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 5 Martin Renvoize (ashimema) 2023-10-18 13:15:34 UTC
dang.. you beat me to it
Comment 6 Martin Renvoize (ashimema) 2023-10-18 13:22:41 UTC
Created attachment 157317 [details] [review]
Bug 34020: Preserve order of subfields in 264 display

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

This patch preserves the order.

1) Edit a record and add/update a 264 fields to have subfields a, b, a,
   b, c in that order
1) Search for record in staff and opac, see subfields displayed in
   order "aabbc" in results
2) View the details page for the record in staff and opac, note same
   order
3) Apply the patch, restart all
4) Confirm staff and opac, results and details now follow the order of
   the subfields in the record's field

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize (ashimema) 2023-10-18 13:22:43 UTC
Created attachment 157318 [details] [review]
Bug 34020: Add spans to subfields

The 260 field has spans for each subfield, we should provide the same
for 264

To test:
1 - Apply patch
2 - Inspect the record 264 display on staff and opac, results and
    details
3 - Confirm spans are constructed correctly and named sensibly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 8 Martin Renvoize (ashimema) 2023-10-18 13:23:19 UTC
Doh.. we clashed and came up with pretty much exactly the same solution!

Passing QA on yours.
Comment 9 Martin Renvoize (ashimema) 2023-10-18 13:26:16 UTC
Created attachment 157319 [details] [review]
Bug 34020: (QA follow-up) Indentation fix

The middle 'if' block was indented a level deeper than expected.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 10 Tomás Cohen Arazi (tcohen) 2023-10-25 13:36:20 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 11 Fridolin Somers 2023-10-26 08:09:53 UTC
Enhancement not pushed to 23.05.x