Bug 40584 - When AutoControlNumber is activated not show 001 in Advanced Editor
Summary: When AutoControlNumber is activated not show 001 in Advanced Editor
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: 24.11
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-02 14:42 UTC by Pablo López Liotti
Modified: 2025-10-01 12:52 UTC (History)
4 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 40584: show 001 in Advanced Editor and preserve its existing value instead of overwriting it (2.64 KB, patch)
2025-09-10 15:39 UTC, Peter Vashchuk
Details | Diff | Splinter Review
Bug 40584: show 001 in Advanced Editor and preserve its existing value instead of overwriting it (2.40 KB, patch)
2025-09-10 15:49 UTC, Peter Vashchuk
Details | Diff | Splinter Review
Bug 40584: show 001 in Advanced Editor and preserve its existing value instead of overwriting it (2.55 KB, patch)
2025-10-01 12:52 UTC, OpenFifth Sandboxes
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Pablo López Liotti 2025-08-02 14:42:20 UTC
How explain in subject when autoControlNumber syspref is config to "generated at biblionumber" at record edition in Rancor the 001 Marc field not display.

When syspref is config to "not generate automatically" the field display is correct.

This behavior is very confuse to record control tasks. If the librarian has omitted field 001 and anybody supervises the record with Rancor is not shure that 001 was created or not. In the "normal" editor almost in default framework the 001 field appears normally.

Cheers to team.

Pablo
Comment 1 Jussi Brunberg 2025-09-10 11:46:02 UTC
This is bad. Not only does the Advanced Editor hide the 001 field, but it also silently overwrites it, if it existed before.

The documentation for autoControlNumber ( https://koha-community.org/manual/24.11/en/html/catalogingpreferences.html#autocontrolnumber ) says: “This will not affect existing records that already have a value in 001. The existing value will be preserved.”
Comment 2 Peter Vashchuk 2025-09-10 15:39:24 UTC Comment hidden (obsolete)
Comment 3 Peter Vashchuk 2025-09-10 15:49:18 UTC
Created attachment 186334 [details] [review]
Bug 40584: show 001 in Advanced Editor and preserve its existing value instead of overwriting it

This patch makes the 001 field visible when editing a record in the advanced
editor and fixes a bug where, if the syspref autoControlNumber was set to
"generated as biblionumber," editing a record through the advanced editor
would overwrite the existing 001 value.

1. Create a new record with a custom "001 Control Number" MARC field, don't use biblionumber as control number.
2. In the system preferences set EnableAdvancedCatalogingEditor to "enable" and autoControlNumber to "generated as biblionumber"
3. Edit record, switch to advanced editor either through option in the "Settings" dropdown menu or switch on top right of the page.
4. In the advanced editor see that it doesn't show 001 field, no need to change anything just use the save button to save the record.
5. On the record page see MARC preview, it's gonna be overwritten by the value of biblionumber.
6. With basic editor change the 001 field to your old custom value.
7. Apply the patch.
8. Use the advanced editor again, 001 field should be visible now.
9. Use the save button to save the record. Make sure that your custom value is still there by using MARC preview on records page.
Comment 4 OpenFifth Sandboxes 2025-10-01 12:52:10 UTC
Created attachment 187188 [details] [review]
Bug 40584: show 001 in Advanced Editor and preserve its existing value instead of overwriting it

This patch makes the 001 field visible when editing a record in the advanced
editor and fixes a bug where, if the syspref autoControlNumber was set to
"generated as biblionumber," editing a record through the advanced editor
would overwrite the existing 001 value.

1. Create a new record with a custom "001 Control Number" MARC field, don't use biblionumber as control number.
2. In the system preferences set EnableAdvancedCatalogingEditor to "enable" and autoControlNumber to "generated as biblionumber"
3. Edit record, switch to advanced editor either through option in the "Settings" dropdown menu or switch on top right of the page.
4. In the advanced editor see that it doesn't show 001 field, no need to change anything just use the save button to save the record.
5. On the record page see MARC preview, it's gonna be overwritten by the value of biblionumber.
6. With basic editor change the 001 field to your old custom value.
7. Apply the patch.
8. Use the advanced editor again, 001 field should be visible now.
9. Use the save button to save the record. Make sure that your custom value is still there by using MARC preview on records page.

Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>