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.