Bugzilla – Attachment 80732 Details for
Bug 20592
updateitem.pl causes database errors when empty non-public item notes updated
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20592: Return early in ModItem if nothing to update
Bug-20592-Return-early-in-ModItem-if-nothing-to-up.patch (text/plain), 1.43 KB, created by
Jonathan Druart
on 2018-10-17 15:46:01 UTC
(
hide
)
Description:
Bug 20592: Return early in ModItem if nothing to update
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-10-17 15:46:01 UTC
Size:
1.43 KB
patch
obsolete
>From b05c82a67bcff77a7dd7d8239a8f70c3d0800e19 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Tue, 17 Apr 2018 23:59:58 +0000 >Subject: [PATCH] Bug 20592: Return early in ModItem if nothing to update > >Two lines of code and move them earlier. >Add a check to make sure there are changes. > >Followed the test plan, both the _BEFORE_ and after do as described. > >Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > C4/Items.pm | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index 926879ee4f..f81e0ca1b8 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -543,6 +543,9 @@ sub ModItem { > my $log_action = $additional_params->{log_action} // 1; > my $unlinked_item_subfields = $additional_params->{unlinked_item_subfields}; > >+ return unless %$item; >+ $item->{'itemnumber'} = $itemnumber or return; >+ > # if $biblionumber is undefined, get it from the current item > unless (defined $biblionumber) { > $biblionumber = _get_single_item_column('biblionumber', $itemnumber); >@@ -552,8 +555,6 @@ sub ModItem { > $item->{'more_subfields_xml'} = _get_unlinked_subfields_xml($unlinked_item_subfields); > }; > >- $item->{'itemnumber'} = $itemnumber or return; >- > my @fields = qw( itemlost withdrawn damaged ); > > # Only call GetItem if we need to set an "on" date field >-- >2.11.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 20592
:
74286
|
74399
|
74400
|
74824
|
74825
|
74826
|
78453
|
78454
|
80728
|
80731
| 80732