]> git.koha-community.org Git - koha.git/commit
Bug 14205: Deleting an Item/Record does not remove link to course reserve
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 4 Aug 2015 09:00:51 +0000 (10:00 +0100)
committerChris Cormack <chris@bigballofwax.co.nz>
Tue, 22 Sep 2015 01:21:09 +0000 (13:21 +1200)
commitc14c5d180d038e3b772693beed2d20c1c091d95c
tree560efa54b6129d8c435619cfaf9420f8bede0474
parent640ad36da42868ec64f6fcf342cf32636179505d
Bug 14205: Deleting an Item/Record does not remove link to course reserve

A constraint is missing on the course_reserves.ci_id field.
This patch adds it and removes orphan rows.

Test plan:
0/ Don't apply the patch
1/ Login to Staff Site.
2/ Go to Course Reserves
3/ Create Course
4/ Add Reserve
5/ Go to item added (delete item/record)
6/ Refresh Course (see no items attached)
7/ Delete Course
8/ See course still listed in the courses (Not deleted)
9/ Apply the patch and execute the updatedatabase entry.
10/ Delete the Course
Note that the course has correctly been removed.

NOTE: Make sure to set the UseCourseReserves system preference to test.
      Tested before (problem existed) and after (problem solved) update.
      Dropped DB, web installed, and put in dummy data and retested.
      Problem solved.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
(cherry picked from commit fc568dfb22238a052d7772a0bba374f836543d46)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
installer/data/mysql/atomicupdate/bug_14205-add_fk_course_reserves_ci_id.sql [new file with mode: 0644]
installer/data/mysql/kohastructure.sql