https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21708 Bug ID: 21708 Summary: Editing a record moves field 999 to first in the marcxml Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: pasi.kallinen@joensuu.fi QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl 1) Import or create a new record. 2) Examine the marcxml of that record in the database - the fields are in the correct numerical order. 3) Edit the record - no need to change any data, just save it. 4) Examine the marcxml in the database - the 999 field is now right after leader and before 001. This is due to TransformHtmlToMarc in C4/Biblio.pm, specifically the $param eq 'biblionumber' case, which pushes the param in the array first, and then the sub uses $record->append_field() Perhaps the array should be sorted by field tag before appending the fields? AFAIK, this doesn't really show up anywhere in Koha, but if you ever edit the records via a script using MARC::Record, new fields cannot be easily inserted into correct position. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.