Bug 9947 - Creating item for received serial prefills enumchron subfield
In serial receiving : When creating an item for an issue, a javascript prefilles the $h subfield with issue number. This is for MARC21, in UNIMARC serial number is on $v. This patch replaces hard-coded value with the subfield mapped with "items.enumchron". Test plan : - Set "Koha to MARC mapping" of "items.enumchron" on a subfield other than $h, ie $z - Go to a serial subscription detail with "Serial receipt creates an item record" - Click on "Receive" - On an issue, click on "Click to add item" => Check that issue number is copied into selected subfield, ie $z You may test that with no mapping of "items.enumchron" there is no javascript error Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Nice catch! Works as advertised. All tests pass after fixing tabulation characters in serials-edit.tt. Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This commit is contained in:
parent
eed93f9af0
commit
2643f0ec39
1 changed files with 7 additions and 7 deletions
|
@ -68,13 +68,13 @@ function unHideItems(index,labelindex, serialId) {
|
|||
label = document.getElementById(labelindex);
|
||||
label.style.display='none';
|
||||
|
||||
// Prefilling 995$h with serial enumeration/issue number
|
||||
// Getting item id
|
||||
itemid = $("fieldset#" + index + " div.cataloguing_additem_itemlist div.items").attr("id");
|
||||
// Getting subfield id
|
||||
subfieldid = "subfield" + itemid.substr(4) + "h";
|
||||
// Setting text field
|
||||
$("#" + subfieldid + " input[type='text']").val($("#serialseq" + serialId).val());
|
||||
// Prefilling enumcron subfield with serial enumeration/issue number
|
||||
// Getting item div
|
||||
item_div = $("fieldset#" + index + " div.cataloguing_additem_itemlist div.items");
|
||||
// Getting subfield with enumcron mapping
|
||||
subfield_div = $(item_div).find("input[name='kohafield'][value='items.enumchron']").parent();
|
||||
// Setting text field
|
||||
$(subfield_div).children("input[type='text'][name='field_value']").val($("#serialseq" + serialId).val());
|
||||
|
||||
}
|
||||
function HideItems(index,labelindex) {
|
||||
|
|
Loading…
Reference in a new issue