Bugzilla – Attachment 156451 Details for
Bug 34689
Add and duplicate item - Error 500
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34689: Ignore itemnumber when creating item hash
Bug-34689-Ignore-itemnumber-when-creating-item-has.patch (text/plain), 1.69 KB, created by
Victor Grousset/tuxayo
on 2023-10-01 21:00:31 UTC
(
hide
)
Description:
Bug 34689: Ignore itemnumber when creating item hash
Filename:
MIME Type:
Creator:
Victor Grousset/tuxayo
Created:
2023-10-01 21:00:31 UTC
Size:
1.69 KB
patch
obsolete
>From 7afd80eddc76d87c34d231b03f0af4c6902a769e Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Fri, 29 Sep 2023 12:44:11 +0000 >Subject: [PATCH] Bug 34689: Ignore itemnumber when creating item hash > >A primary key error can be thrown when an item number is included in a new title hash. We need the item creation to ignore an itemnumber even if it is included in a MARC Framework > >Test plan: >1) Edit the MARC framework relating to books (BKS in KTD) >2) In the 952$9 field (Koha itemnumber (autogenerated)), change the value of "Managed in tab" to "items (10)" >3) In the catalog, find a record that uses that MARC framework >4) Click "New" and choose to add a new item >5) Enter a barcode and click the "Add & duplicate" button >6) The page will refresh and an item will have been added >7) Enter a new barcode and click the same button again >8) An error will be thrown >9) Click the back button in the browser >10) Apply patch and restart_all >11) Click the add and duplicate button again >12) This time no error will be thrown and the page will refresh with another new item added >13) Sign off! > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> >--- > cataloguing/additem.pl | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl >index 4d7b00b4b0..1e397a0de2 100755 >--- a/cataloguing/additem.pl >+++ b/cataloguing/additem.pl >@@ -262,6 +262,7 @@ if ($op eq "additem") { > } > $item->more_subfields_xml(undef); > } else { >+ next if $c eq 'itemnumber'; > my @v = grep { $_ ne "" } > uniq $input->multi_param( "items." . $c ); > >-- >2.42.0
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 34689
:
156390
|
156431
| 156451