Bug 40959

Summary: LOC classification display broken
Product: Koha Reporter: Tomás Cohen Arazi (tcohen) <tomascohen>
Component: MARC Bibliographic data supportAssignee: Tomás Cohen Arazi (tcohen) <tomascohen>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: lucas, tomascohen
Version: unspecified   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on:    
Bug Blocks: 30148    
Attachments: Bug 40959: Fix LOC classification display (staff interface)
Bug 40959: Fix LOC classification display (staff interface)

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>