Bugzilla – Attachment 190155 Details for
Bug 37140
Add vendor automatically to 952 $e when creating items for serials
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37140: Add vendor id automatically to 952 when creating items for serials
Bug-37140-Add-vendor-id-automatically-to-952-when-.patch (text/plain), 4.16 KB, created by
Matt Blenkinsop
on 2025-12-04 15:46:52 UTC
(
hide
)
Description:
Bug 37140: Add vendor id automatically to 952 when creating items for serials
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2025-12-04 15:46:52 UTC
Size:
4.16 KB
patch
obsolete
>From 86350386bbc7038da3454fc103d5ba6410af747e Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> >Date: Thu, 4 Dec 2025 15:42:06 +0000 >Subject: [PATCH] Bug 37140: Add vendor id automatically to 952 when creating > items for serials >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Test plan: >1) If necessary, set 952 $e in the bibliographic framework to visible in the staff interface and the editor. >2) Navigate to the serials module >3) Create a subscription with a vendor and the setting âcreate an item recordâ and save it. >4) Nagivate to serial collection. >5) Set a serial issue from status âExpectedâ to âArrivedâ >6) The vendor in subfield âeâ (Source of acquisition) in the item form is empty >7) Apply the patch >8) Hard refresh the browser and the vendor should now be pre-populated with the vendor id > >Sponsored-by: Bibliotheksservice-Zentrum Baden-Württemberg (BSZ) >--- > .../prog/en/modules/serials/serials-edit.tt | 25 +++++++++++-------- > 1 file changed, 14 insertions(+), 11 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt >index b7e742623b9..696382d2ae1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt >@@ -28,23 +28,25 @@ > window.open("subscription-renew.pl?op=renew&subscriptionid=" + subscriptionid, "subscription_renewal", "width=700,height=400,toolbar=false,scrollbars=yes"); > } > >+ function presetItemFieldValue(index, fieldName, presetValue) { >+ item_div = $("fieldset#" + index + " div.cataloguing_additem_itemlist div.items"); >+ // Getting subfield with enumcron mapping >+ subfield_div = $(item_div) >+ .find("input[name='kohafield'][value='" + fieldName + "']") >+ .parent(); >+ // Setting text field if no saved default value >+ if (!$(subfield_div).children("input[type='text'][name='field_value']").val()) { >+ $(subfield_div).children("input[type='text'][name='field_value']").val(presetValue); >+ } >+ } > function unHideItems(index, labelindex, serialId) { > subfield = document.getElementById(index); > subfield.style.display = "block"; > label = document.getElementById(labelindex); > label.style.display = "none"; > >- // 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 if no saved default value >- if (!$(subfield_div).children("input[type='text'][name='field_value']").val()) { >- $(subfield_div) >- .children("input[type='text'][name='field_value']") >- .val($("#serialseq" + serialId).val()); >- } >+ presetItemFieldValue(index, "items.enumchron", $("#serialseq" + serialId).val()); >+ presetItemFieldValue(index, "items.booksellerid", $("input[type='hidden'][name='bookseller']").val()); > } > function HideItems(index, labelindex) { > subfield = document.getElementById(index); >@@ -172,6 +174,7 @@ > <input type="hidden" name="biblionumber" value="[% serialslis.biblionumber | html %]" /> > <input type="hidden" name="itemcount" value="[% serialslis.issuesatonce | html %]" /> > <input type="hidden" name="user" value="[% serialslis.librarian | html %]" /> >+ <input type="hidden" name="bookseller" value="[% serialslis.aqbooksellerid | html %]" /> > Issue <input type="text" name="serialseq" id="serialseq[% serialslis.serialid | html %]" value="[% serialslis.serialseq | html %]" size="20" maxlength="100" /> > </td> > <td> >-- >2.50.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 37140
:
190154
|
190155
|
190156
|
190162
|
190543