Bug 40959 - LOC classification display broken
Summary: LOC classification display broken
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Bibliographic data support (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: Tomás Cohen Arazi (tcohen)
QA Contact: Nick Clemens (kidclamp)
URL:
Keywords:
Depends on: 23731
Blocks: 30148
  Show dependency treegraph
 
Reported: 2025-10-06 13:53 UTC by Tomás Cohen Arazi (tcohen)
Modified: 2025-11-10 14:40 UTC (History)
5 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes the display logic for the Library of Congress classification field (050) in the staff interface for MARC21. The separator was being shown between subfields $a and $b, instead of between additional 050 entries. Example: For an 050 with two entries: 050 4 $aE337.5 $b.O54 2025 050 4 $aE415.7 $b.A44 2025 This was incorrectly shown in the staff interface as: LOC classification: E337.5 | .O54 2025 E415.7 | .A44 2025 It should have been shown as: LOC classification: E337.5 O54 2025 | E415.7 A44 2025
Version(s) released in:
25.11.00,25.05.05,24.11.11
Circulation function:


Attachments
Bug 40959: Fix LOC classification display (staff interface) (1.84 KB, patch)
2025-10-06 15:07 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 40959: Fix LOC classification display (staff interface) (1.89 KB, patch)
2025-10-06 20:12 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 40959: Fix LOC classification display (staff interface) (1.95 KB, patch)
2025-10-16 19:37 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi (tcohen) 2025-10-06 13:53:41 UTC
To reproduce:
1. Open a record to edit it
2. Add 050 like this:

```
050  4 $aE337.5 $b.O54 2025
050  4 $aE415.7 $b.A44 2025
```

3. Save
=> FAIL On the staff interface it displays:

```
LOC classification: E337.5 | .O54 2025 E415.7 | .A44 2025
```

4. In the OPAC, it renders correctly
Comment 1 Tomás Cohen Arazi (tcohen) 2025-10-06 15:07:28 UTC
Created attachment 187481 [details] [review]
Bug 40959: Fix LOC classification display (staff interface)

This patch fixes the display logic for the LOC classification field
(050).

The current issue is that the inner components (each subfield) gets
separated with the pipe symbol (|) instead of grouping the components
together and using the separator for the outer 050 occurences.

To test:
1. Open a record to edit it
2. Add 050 like this:

```
050  4 $aE337.5 $b.O54 2025
050  4 $aE415.7 $b.A44 2025
```

3. Save
=> FAIL On the staff interface it displays:

```
LOC classification: E337.5 | .O54 2025 E415.7 | .A44 2025
```

4. Apply this patch
5. Run:
   $ ktd --shell
  k$ restart_all
6. Reload the detail page
=> SUCCESS: Things display correctly!
7. Sign off :-D
Comment 2 Lucas Gass (lukeg) 2025-10-06 20:12:08 UTC
Created attachment 187496 [details] [review]
Bug 40959: Fix LOC classification display (staff interface)

This patch fixes the display logic for the LOC classification field
(050).

The current issue is that the inner components (each subfield) gets
separated with the pipe symbol (|) instead of grouping the components
together and using the separator for the outer 050 occurences.

To test:
1. Open a record to edit it
2. Add 050 like this:

```
050  4 $aE337.5 $b.O54 2025
050  4 $aE415.7 $b.A44 2025
```

3. Save
=> FAIL On the staff interface it displays:

```
LOC classification: E337.5 | .O54 2025 E415.7 | .A44 2025
```

4. Apply this patch
5. Run:
   $ ktd --shell
  k$ restart_all
6. Reload the detail page
=> SUCCESS: Things display correctly!
7. Sign off :-D

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 3 Nick Clemens (kidclamp) 2025-10-16 19:37:56 UTC
Created attachment 188036 [details] [review]
Bug 40959: Fix LOC classification display (staff interface)

This patch fixes the display logic for the LOC classification field
(050).

The current issue is that the inner components (each subfield) gets
separated with the pipe symbol (|) instead of grouping the components
together and using the separator for the outer 050 occurences.

To test:
1. Open a record to edit it
2. Add 050 like this:

```
050  4 $aE337.5 $b.O54 2025
050  4 $aE415.7 $b.A44 2025
```

3. Save
=> FAIL On the staff interface it displays:

```
LOC classification: E337.5 | .O54 2025 E415.7 | .A44 2025
```

4. Apply this patch
5. Run:
   $ ktd --shell
  k$ restart_all
6. Reload the detail page
=> SUCCESS: Things display correctly!
7. Sign off :-D

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 4 Lucas Gass (lukeg) 2025-10-20 16:14:38 UTC
Nice work everyone!

Pushed to main for 25.11
Comment 5 Paul Derscheid 2025-10-29 09:10:16 UTC
Nice work everyone!

Pushed to 25.05.x
Comment 6 Fridolin Somers 2025-11-10 14:40:16 UTC
Pushed to 24.11.x for 24.11.11