Bugzilla – Attachment 180682 Details for
Bug 39570
Add item form includes itemnumber while adding a new item
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39570: Add item form includes itemnumber while adding a new item
Bug-39570-Add-item-form-includes-itemnumber-while-.patch (text/plain), 2.29 KB, created by
Phil Ringnalda
on 2025-04-04 20:47:44 UTC
(
hide
)
Description:
Bug 39570: Add item form includes itemnumber while adding a new item
Filename:
MIME Type:
Creator:
Phil Ringnalda
Created:
2025-04-04 20:47:44 UTC
Size:
2.29 KB
patch
obsolete
>From 569159dcfd377aed53e1149b8f0dc00ff7590265 Mon Sep 17 00:00:00 2001 >From: Phil Ringnalda <phil@chetcolibrary.org> >Date: Fri, 4 Apr 2025 13:27:04 -0700 >Subject: [PATCH] Bug 39570: Add item form includes itemnumber while adding a > new item > >Because the template uses the wrong op, add_item rather than cud-additem, to >decide whether to include a hidden input with the itemnumber, if you edit an >item and then add another item you wind up submitting a form that includes the >previous itemnumber when you add a new one. Nothing happens, because the code >for adding an item doesn't look at $input->param('itemnumber'), but since it >doesn't mean anything we shouldn't be submitting it. > >Test plan: >1. Without the patch, find any biblio with at least one item attached, and > in the items table click Edit item on one of them >2. Without needing to making any changes, click Save changes >3. In the page that loads, scroll down to the bottom of the Add item form, > right-click the Add item button, and choose Inspect >4. A few lines up, above a '<fieldset class="action">,' there will be an > '<input type="hidden" name="itemnumber" value="633">' with the itemnumber > of the item you previously edited >5. Apply patch >6. Scroll up, click Actions - Edit on any item, then Save changes >7. Again, right-click the Add item button, Inspect, note that there isn't a > itemnumber input with the number of the item you previously edited > >Sponsored-by: Chetco Community Public Library >--- > koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >index 90fe28057e..bc59e8c9c9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >@@ -297,7 +297,7 @@ > [% END %] > > <fieldset class="rows"> [% PROCESS subfields_for_item subfields => subfields %] </fieldset> >- [% IF op != 'add_item' %] >+ [% IF op != 'cud-additem' %] > <input type="hidden" name="itemnumber" value="[% itemnumber | html %]" /> > [% END %] > >-- >2.48.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 39570
:
180682
|
180713
|
180814