Bug 22652: Editing Course reserves is broken
authorLyon3 Team <koha@univ-lyon3.fr>
Thu, 11 Apr 2019 08:48:42 +0000 (10:48 +0200)
committerNick Clemens <nick@bywatersolutions.com>
Tue, 16 Apr 2019 13:17:23 +0000 (13:17 +0000)
To test:
1. Create a course reserve or go on an existing one
2. Add items and add a change for the holdingbranch
3. On the list of items in this course reserve
(course_reserves/course-details.pl?course_id=xx), click on "edit" at the
end of a row :

Without the patch, you can't see the holdingbranch you have choose for
this item, but you see "LEAVE UNCHANGED"

With the patch, you can see the holdingbranch you have choose when
adding this item in the course

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Mikaƫl Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step2.tt

index 6c1c5f8..919c7d5 100644 (file)
@@ -88,7 +88,7 @@
                         <select id="holdingbranch" name="holdingbranch">
                             <option value="">LEAVE UNCHANGED</option>
                             [% FOREACH b IN Branches.all() %]
-                                [% IF course_item.holdingbranch.defined && ( ( course.enabled == 'yes' && b.value == item.holdingbranch ) || ( course.enabled == 'no' && b.value == course_item.holdingbranch ) ) %]
+                                [% IF course_item.holdingbranch.defined && ( ( course.enabled == 'yes' && b.branchcode == item.holdingbranch ) || ( course.enabled == 'no' && b.branchcode == course_item.holdingbranch ) ) %]
                                     <option value="[% b.branchcode | html %]" selected="selected">[% b.branchname | html %]</option>
                                 [% ELSE %]
                                     <option value="[% b.branchcode | html %]">[% b.branchname | html %]</option>