Bug 41685 - MARC21: Sort 4xx/5xx in BuildSummary alphabetic within hierarchy ($w: g or h)
Summary: MARC21: Sort 4xx/5xx in BuildSummary alphabetic within hierarchy ($w: g or h)
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Authority data support (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-01-22 13:17 UTC by Marcel de Rooy
Modified: 2026-02-02 13:51 UTC (History)
1 user (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 46185: Sort see from / see also in BuildSummary (2.12 KB, patch)
2026-01-28 13:01 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 41685: Sort seefrom/seealso in BuildSummary (2.74 KB, patch)
2026-02-02 13:51 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 41685: Unit tests (1.81 KB, patch)
2026-02-02 13:51 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2026-01-22 13:17:24 UTC
Currently, the list of seefrom/seealso is sorted in the order of the MARC fields. We would like to sort the Broader terms first and the Narrower terms last, with other terms in the middle. All groups should be sorted alphabetically on $a.

This summary is mainly used in the authority search results on OPAC and intranet.
Comment 1 Marcel de Rooy 2026-01-28 13:01:05 UTC
Created attachment 192118 [details] [review]
Bug 46185: Sort see from / see also in BuildSummary

Test plan:
Comes very soon.
Comment 2 Marcel de Rooy 2026-02-02 11:04:51 UTC
Comment on attachment 192118 [details] [review]
Bug 46185: Sort see from / see also in BuildSummary

Wrong bug number
Comment 3 Marcel de Rooy 2026-02-02 13:51:06 UTC
Created attachment 192318 [details] [review]
Bug 41685: Sort seefrom/seealso in BuildSummary

Test plan (MARC21):
[1] Create an authority record, say a term. Include two 450s, the first
    one starting with Z and second with A. Include five 550s, where two
    are narrower ($w==h), two broader ($w==g) and one without $w. Make
    sure that the terms will sort differently than the field order (go
    back in alphabet when filling subsequent $a's or so).
[2] Perform an authority search that includes the new authority.
[3] Verify that the terms in the Summary column for this authority
    are sorted first on hierarchy, second alphabetically. The one
    without hierarchy should be in the middle.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Marcel de Rooy 2026-02-02 13:51:07 UTC
Created attachment 192319 [details] [review]
Bug 41685: Unit tests

Test plan:
Run t/db_dependent/AuthoritiesMarc.t

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