Bug 22652: Editing Course reserves is broken
authorLyon3 Team <koha@univ-lyon3.fr>
Thu, 11 Apr 2019 08:48:42 +0000 (10:48 +0200)
committerLucas Gass <lucas@bywatersolutions.com>
Fri, 26 Apr 2019 03:00:39 +0000 (03:00 +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>
(cherry picked from commit ba14e9ca7d40af664f7079c6a9f85a85e88fca9a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 27209dea6666c490431aa56485771d8e36c0125a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

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

index 13b2761..cce23f4 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 %]">[% b.branchname %]</option>