From: Josh Stompro Date: Wed, 16 Feb 2022 22:14:22 +0000 (-0600) Subject: LP1273566 - Fix acq lineitem order identifier entry for UPC. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=bf4cff6e3b55d5eb9b5f7914a9ee7628e0a9942f;p=working%2FEvergreen.git LP1273566 - Fix acq lineitem order identifier entry for UPC. Adding a new UPC via the lineitem order identifier was failing because the lineitem_marc_attr_definition for upc requires an ind1 value of 1. Testing Plan: This will be easier to test on a test system with production data. Otherwise you need to get setup to use acquistions and to create new POs Before change - 1. Create a new po. 2. Add a lineitem for an existing record that has ISBN data. 3. Change the order identifier to upc, and enter a value and then move focus off the field. 4. The order identifier will switch back to ISBN. After Change - 1. Create a new po. 2. Add a lineitem for an existing record that has ISBN data. 3. Change the order identifier to upc, and enter a value and then move focus off the field. 4. The order identifier will stay as the upc you just entered. 5. Check the linked bib record, and see that the upc marc info (024) has been added. Signed-off-by: Josh Stompro --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm index 104cf71fc5..c7d9ee2f7d 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm @@ -4248,8 +4248,12 @@ sub apply_new_li_ident_attr { upc => '024' ); + my $ind1 = ''; + #Set Indicator 1 for upc tag + $ind1 = 1 if $attr_name == 'upc'; + my $marc_field = MARC::Field->new( - $tags{$attr_name}, '', '','a' => $attr_value); + $tags{$attr_name}, $ind1, '','a' => $attr_value); my $li_rec = MARC::Record->new_from_xml($li->marc, 'UTF-8', 'USMARC'); $li_rec->insert_fields_ordered($marc_field);