From 4a6cf130219be37b2c5da4e7849a023e4e5294f1 Mon Sep 17 00:00:00 2001 From: Kyle Hall Date: Wed, 8 Mar 2023 11:08:37 -0500 Subject: [PATCH] Bug 33171: Add coded_location_qualifier, barcode, and enumchron to MarcItemFieldsToOrder Some libraries would like to use the following item fields with the MarcItemFieldsToOrder system preference: * coded_location_qualifier * barcode * enumchron Test Plan: 1) Set up MarcItemFieldsToOrder, verify it is functioning 2) Test coded_location_qualifier, barcode, and enumchron 3) Note the fields are imported and set for the items Signed-off-by: Matt Blenkinsop Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- acqui/addorderiso2709.pl | 34 +++++++++++-------- .../prog/en/modules/acqui/addorderiso2709.tt | 12 +++++++ .../admin/preferences/acquisitions.pref | 4 +-- 3 files changed, 34 insertions(+), 16 deletions(-) diff --git a/acqui/addorderiso2709.pl b/acqui/addorderiso2709.pl index de951f7bc5..ce53488a7d 100755 --- a/acqui/addorderiso2709.pl +++ b/acqui/addorderiso2709.pl @@ -228,6 +228,9 @@ if ($op eq ""){ my @itemprices = $input->multi_param('itemprice_' . $import_record->import_record_id); my @replacementprices = $input->multi_param('replacementprice_' . $import_record->import_record_id); my @itemcallnumbers = $input->multi_param('itemcallnumber_' . $import_record->import_record_id); + my @coded_location_qualifiers = $input->multi_param('coded_location_qualifier_' . $import_record->import_record_id); + my @barcodes = $input->multi_param('barcode_' . $import_record->import_record_id); + my @enumchrons = $input->multi_param('enumchron_' . $import_record->import_record_id); my $itemcreation = 0; my @itemnumbers; @@ -235,20 +238,23 @@ if ($op eq ""){ $itemcreation = 1; my $item = Koha::Item->new( { - biblionumber => $biblionumber, - homebranch => $homebranches[$i], - holdingbranch => $holdingbranches[$i], - itemnotes_nonpublic => $nonpublic_notes[$i], - itemnotes => $public_notes[$i], - location => $locs[$i], - ccode => $ccodes[$i], - itype => $itypes[$i], - notforloan => $notforloans[$i], - uri => $uris[$i], - copynumber => $copynos[$i], - price => $itemprices[$i], - replacementprice => $replacementprices[$i], - itemcallnumber => $itemcallnumbers[$i], + biblionumber => $biblionumber, + homebranch => $homebranches[$i], + holdingbranch => $holdingbranches[$i], + itemnotes_nonpublic => $nonpublic_notes[$i], + itemnotes => $public_notes[$i], + location => $locs[$i], + ccode => $ccodes[$i], + itype => $itypes[$i], + notforloan => $notforloans[$i], + uri => $uris[$i], + copynumber => $copynos[$i], + price => $itemprices[$i], + replacementprice => $replacementprices[$i], + itemcallnumber => $itemcallnumbers[$i], + coded_location_qualifier => $coded_location_qualifiers[$i], + barcode => $barcodes[$i], + enumchron => $enumchrons[$i], } )->store; push( @itemnumbers, $item->itemnumber ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt index 1e3a4eb730..b0c1eba563 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt @@ -375,6 +375,18 @@ +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • [% END # /FOREACH item %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref index a29c7b9dd5..e9be332383 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref @@ -82,8 +82,8 @@ Acquisitions: - pref: MarcItemFieldsToOrder type: textarea syntax: text/x-yaml - - "

    You can use the following fields: homebranch, holdingbranch, itype, nonpublic_note, public_note, loc, ccode, notforloan, uri, copyno, price, replacementprice and itemcallnumber. Special fields: quantity and budget_code

    " - - "

    For example:
    holdingbranch: 975$b
    itype: 975$9|975$z

    " + - "You can use the following fields: homebranch, holdingbranch, itype, nonpublic_note, public_note, loc, ccode, notforloan, uri, copyno, price, replacementprice, itemcallnumber, coded_location_qualifier, barcode, and enumchron. Special fields: quantity and budget_code" + - "
    For example:
    holdingbranch: 975$b
    itype: 975$9|975$z" - "

    If a field is missing or not mapped, MarcFieldsToOrder will be checked and used for that field (except quantity).

    " - - pref: ClaimsBccCopy -- 2.39.5