Bugzilla – Attachment 91310 Details for
Bug 23083
Course reserve item edit fails if one does not set all values
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23083: Fix course reserve item editing if one of the value is set to UNCHANGED
Bug-23083-Fix-course-reserve-item-editing-if-one-o.patch (text/plain), 2.00 KB, created by
Marcel de Rooy
on 2019-07-05 05:45:28 UTC
(
hide
)
Description:
Bug 23083: Fix course reserve item editing if one of the value is set to UNCHANGED
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2019-07-05 05:45:28 UTC
Size:
2.00 KB
patch
obsolete
>From 0b87939f30a19b6f71325b589c2428d8a355723f Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 19 Jun 2019 20:08:04 -0500 >Subject: [PATCH] Bug 23083: Fix course reserve item editing if one of the > value is set to UNCHANGED >Content-Type: text/plain; charset=utf-8 > >Test plan: >0: Do not apply the patches >1: Create an item with itype, ccode, location, and holding branch set >2: Create a course >3: Add item to course, changing the values for itype, ccode, and location >4: Click Edit for that item on course-details.pl >5: Assign new values for itype, ccode, and location but leave the holding library dropdown set to LEAVE UNCHANGED >6: Hit Save >7: Back on course-details.pl, observe that the item is still showing the values set in step 3 >8: Apply this patch >9: Repeat 4 to 6 >10: Back on course-details.pl, observe that the item is now showing the correct values >11: Edit the course reserve again, setting new values for itype, ccode, and location and setting the holding library dropdown to whatever the holding library for the item is currently >12: hit save >13: On course-details.pl, see that the change actually happened, the item is now showing the values set in step 9 > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/CourseReserves.pm | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > >diff --git a/C4/CourseReserves.pm b/C4/CourseReserves.pm >index 428d7e9d33..39630b63c9 100644 >--- a/C4/CourseReserves.pm >+++ b/C4/CourseReserves.pm >@@ -531,11 +531,12 @@ sub _UpdateCourseItem { > unless ($course_item); > $ci_id = $course_item->{'ci_id'} unless ($ci_id); > >- >- my %mod_params; >- foreach (@FIELDS) { >- $mod_params{$_} = $params{$_}; >- } >+ my %mod_params = >+ map { >+ defined $params{$_} && $params{$_} ne '' >+ ? ( $_ => $params{$_} ) >+ : () >+ } @FIELDS; > > ModItem( \%mod_params, undef, $course_item->{'itemnumber'} ); > } >-- >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 23083
:
90818
|
90819
|
91134
|
91135
|
91309
| 91310