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 <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Kyle Hall 2023-03-08 11:08:37 -05:00 committed by Katrin Fischer
parent 8d84f8496b
commit 4a6cf13021
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834
3 changed files with 34 additions and 16 deletions

View file

@ -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 );

View file

@ -375,6 +375,18 @@
<label for="callnumber_item_[% item.item_id | html %]">callnumber</label>
<input type="text" id="callnumber_item_[% item.item_id | html %]" name="itemcallnumber_[% biblio.import_record_id | html %]" value="[% item.itemcallnumber | html %]">
</li>
<li>
<label for="coded_location_qualifier_item_[% item.item_id | html %]">coded location qualifier</label>
<input type="text" id="coded_location_qualifier_item_[% item.item_id | html %]" name="coded_location_qualifier_[% biblio.import_record_id | html %]" value="[% item.coded_location_qualifier | html %]">
</li>
<li>
<label for="barcode_item_[% item.item_id | html %]">barcode</label>
<input type="text" id="barcode_item_[% item.item_id | html %]" name="barcode_[% biblio.import_record_id | html %]" value="[% item.barcode | html %]">
</li>
<li>
<label for="enumchron_item_[% item.item_id | html %]">enumchron</label>
<input type="text" id="enumchron_item_[% item.item_id | html %]" name="enumchron_[% biblio.import_record_id | html %]" value="[% item.enumchron | html %]">
</li>
</ol>
</fieldset>
[% END # /FOREACH item %]

View file

@ -82,8 +82,8 @@ Acquisitions:
- pref: MarcItemFieldsToOrder
type: textarea
syntax: text/x-yaml
- "<p>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</p>"
- "<p>For example:<br/>holdingbranch: 975$b<br/>itype: 975$9|975$z</p>"
- "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"
- "<br/>For example:<br/>holdingbranch: 975$b<br/>itype: 975$9|975$z"
- "<p>If a field is missing or not mapped, <a href=\"/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=MarcFieldsToOrder\">MarcFieldsToOrder</a> will be checked and used for that field (except quantity).</p>"
-
- pref: ClaimsBccCopy