]> git.koha-community.org Git - koha.git/commit
Bug 15530 - Editing a course item via a disabled course disables it even if it is...
authorKyle M Hall <kyle@bywatersolutions.com>
Fri, 8 Jan 2016 17:00:36 +0000 (17:00 +0000)
committerFrédéric Demians <f.demians@tamil.fr>
Thu, 11 Feb 2016 18:07:20 +0000 (19:07 +0100)
commit9e456ee006a457bd5afc5859bfff269e97677abb
tree9f37f15189e0e13a7f8c64dd6528ecbe14ca1991
parent56242f3452984be7f92cbc598007e39757d25c24
Bug 15530 - Editing a course item via a disabled course disables it even if it is on other enabled courses

It appears that if the course item is edited by clicking the edit link
from an active course, the course item will be set to enabled and the
fields will be swapped, if the same course item is edited from a course
that is *not* active, the course item will be set to *not* enabled, and
the original fields will be swapped back in!

The short term work-around is to only edit course items from an enabled
course if the item has a course that is enabled. If all the courses it
is on are disabled, it doesn't matter what course the item is edited
from.

Test Plan:
1) Create two courses, 1 enabled and 1 disabled
2) Add an item as a course reserve to both courses
3) Edit the course reserve data for the item via the enabled course
4) Note the course item is enabled ( easy way is to check the database )
5) Edit the same course reserve data, but via the disabled course
6) Note the course item is now disabled even though it is part of
   an enabled course!
7) Apply this patch
8) Repeat steps 1 through 5
9) Note the course item is still enabled

Signed-off-by: Margaret Holt <mholt@bastyr.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit d10adb26aa661a6b5f6dc9b2fd6f8ab966f98918)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 4739952294165f764ee7074f5a71235e328697a3)
C4/CourseReserves.pm