Bug 20282: Match course reserve on holdingbranch
authorNick Clemens <nick@bywatersolutions.com>
Fri, 23 Feb 2018 10:58:27 +0000 (10:58 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Tue, 22 May 2018 10:03:00 +0000 (12:03 +0200)
To test:
1 - Add a course (Course Reserves)
2 - Add an item to the course
3 - Ensure to change the holding branch for the course reserve
4 - Modify the course item
5 - Note the dropdwn for holding branch is unset
6 - Apply patch
7 - Modify the course item
8 - Dropdown should be correctly populated

Signed-off-by: Maksim Sen <maksim.sen@inlibro.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 03b31bfc625484c9219935a50a5d0d3cf017b5e6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

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

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