[Bug 43430] New: Advanced editor omits a missing mandatory 008 when editing a record
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43430 Bug ID: 43430 Summary: Advanced editor omits a missing mandatory 008 when editing a record Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: nugged@gmail.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl Target Milestone: --- The basic MARC editor renders an empty mandatory 008 when an existing MARC21 record does not contain that field. When the field receives focus, the MARC21 008 plugin initializes its 40 positions and provides the fixed-length controls. The advanced editor only loads fields that are present in the record. If 008 is physically absent, it displays no 008 line even when the selected framework marks 008 as mandatory. The cataloguer therefore cannot use the advanced editor's existing 008 widget and fixed-length controls. To reproduce: 1. Use MARC21 and enable EnableAdvancedCatalogingEditor. 2. In a bibliographic framework, mark tag 008 as mandatory and leave its default value empty. 3. Use an existing record in that framework which has no 008 field. 4. Open the record in the basic editor. An empty 008 input is present; focus it and note that it is initialized to a 40-character value. 5. Open the same record in the advanced editor. The 008 line is absent. The advanced editor should add one empty mandatory 008 and let its existing widget initialize the field just as the basic editor does. Editing an existing record must not reapply a non-empty framework default. Existing blank or populated 008 fields, optional missing 008 fields, new records, and duplication should keep their current behavior. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43430 Andrii Nugged <nugged@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nugged@gmail.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43430 --- Comment #1 from Andrii Nugged <nugged@gmail.com> --- Created attachment 204537 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204537&action=edit Bug 43430: Initialize a missing 008 in the advanced editor The basic editor renders an empty mandatory 008 when an existing MARC21 record lacks the field. Its framework plugin then initializes the fixed-length value on focus. The advanced editor omits the field entirely, so its existing 008 widget cannot provide the equivalent behavior. When loading an existing record through the catalog backend, add an empty 008 only if the selected framework marks the tag mandatory. The existing widget then supplies the date, country, language, and allowed-value controls. Do not apply framework defaults during ordinary editing. Existing blank and populated fields, optional 008 tags, new records, and duplicate loading remain unchanged. This follows the initial Advanced Editor missing-008 work by Petro Vashchuk while keeping Bug 42166 duplication behavior unchanged. Test plan: Before applying the patch: 1. Use MARC21 and enable the EnableAdvancedCatalogingEditor system preference. 2. In Administration > MARC bibliographic frameworks, edit a framework so tag 008 is mandatory and has no default value. 3. Find an existing record that uses this framework and has no 008 field. 4. Choose Edit > Edit record in advanced editor. 5. Confirm that no 008 line is shown. 6. Open the same record in the basic editor. 7. Confirm that an empty 008 input is shown and that focusing it initializes a 40-character value. Apply the patch. After applying the patch: 8. Open the same record with Edit > Edit record in advanced editor. 9. Confirm that one empty 008 line is shown. 10. Focus the 008 line and confirm that its widget initializes the value and provides the fixed-length controls. 11. Confirm that a missing optional 008 is not added. 12. Confirm that existing blank and populated 008 fields are not replaced. 13. Confirm that creating a new record and using Edit as new (duplicate) keep their previous behavior. Co-authored-by: Petro Vashchuk <stalkernoid@gmail.com> Co-Authored-By: Loontik <loontik@nugged.team> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43430 Andrii Nugged <nugged@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|NEW |Needs Signoff See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=42166 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org