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 <stompro@stompro.org>
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);