LP#1705478: (follow-up) emit prefix subfield before call number
authorGalen Charlton <gmc@equinoxinitiative.org>
Wed, 2 Aug 2017 18:39:23 +0000 (14:39 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Wed, 2 Aug 2017 18:39:23 +0000 (14:39 -0400)
This patch reorders the subfields so that the prefix (if present)
is emitted in 852$k /before/ the call number subfield ($j); that way,
MARC parsers return subfields in their order in the field (and
humans) will see the components of the call number in their
expected order.

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/support-scripts/marc_export.in

index 604a2ab..d7c21d1 100755 (executable)
@@ -512,8 +512,8 @@ sub next {
                                 b => Encode::decode_utf8($acp->call_number()->owning_lib()->shortname()),
                                 b => Encode::decode_utf8($acp->circ_lib()->shortname()),
                                 c => Encode::decode_utf8($acp->location()->name()),
-                                j => Encode::decode_utf8($acp->call_number()->label()),
                                 ($prefix ? (k => Encode::decode_utf8($prefix)) : ()),
+                                j => Encode::decode_utf8($acp->call_number()->label()),
                                 ($suffix ? (m => Encode::decode_utf8($suffix)) : ()),
                                 ($acp->circ_modifier() ? (g => Encode::decode_utf8($acp->circ_modifier())) : ()),
                                 p => Encode::decode_utf8($acp->barcode()),