[Koha-bugs] [Bug 24480] Fields added with Marc modifications templates are not added in an ordered way

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Oct 16 08:09:40 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24480

Phil Ringnalda <phil at chetcolibrary.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |phil at chetcolibrary.org

--- Comment #14 from Phil Ringnalda <phil at chetcolibrary.org> ---
It doesn't seem reasonable or productive to fail QA for comment 9. Fixing what
this bug was filed for, where an entire added field goes, just involves
switching which existing MARC::Record method to call, and the current behavior
of sticking new fields at the end of the record is never going to be right
(unless you are adding a second 999 field, which would be rather odd behavior).

Fixing the already present behavior which comment 9 brings up about subfields
rather than fields requires first specifying how subfields ought to be ordered
(alphabetical would maybe be right in a few more cases than at the end, but
there are a very large number of cases (e.g. 100 $a$q$d) where alphabetical is
completely wrong, so a useful implementation as opposed to a
differently-useless one would need to allow for a truly awful UI with choices
to add before or after the first, last, and perhaps nth instance of subfield
__), and then implementing that in MARC::Field since it only has the one
subfield method which adds at the end, and then requiring that new version of
MARC::Field, and adding a bunch of subfield choices to SimpleMARC.pm and maybe
renaming it NotSoSimpleMARC.pm as a result.

Far better to file that as a separate enhancement request, and take this patch
perhaps after FQAing it over changing the behavior of the SimpleMARC API
instead of adding to it, or for the unexpected way it is using
insert_fields_ordered() to put a new 520 after any existing 520s except in the
case where rather than Add new you Move an existing 502 to 520, in which case
it uses insert_grouped_field() to put the 520 after an existing 586 or 590.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list