]> git.koha-community.org Git - koha.git/commit
Bug 19475: Don't copy holiday if it already exists in target calendar
authorEmmi Takkinen <emmi.takkinen@outlook.com>
Wed, 4 Mar 2020 11:54:34 +0000 (13:54 +0200)
committerJoy Nelson <joy@bywatersolutions.com>
Tue, 28 Apr 2020 20:20:43 +0000 (20:20 +0000)
commit25ba1342c3b5e54087428fd5bdb5cc83d6cea65c
treeb05d5ad8630c966f26174da42c4322d72ba7b591
parent4d91ae97a17221bcd192d5b89f2cb55056ae26dd
Bug 19475: Don't copy holiday if it already exists in target calendar

Calendars copy tool created duplicate values to database.
Holidays in target calendar weren't checked before
inserting new holidays. This patch fixes this.

To test:
1. Add holidays for branch A
2. Copy branch A calendar to branch B
3. Repeat copy to branch B
=> Check database, branch B has now duplicate holidays
4. Delete holidays from branches A and B
5. Apply patch
6. Repeat steps 1-3
=> Check database, no duplicates

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
C4/Calendar.pm
t/db_dependent/Holidays.t