]> 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)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 3 Apr 2020 13:26:33 +0000 (14:26 +0100)
commita99923a27ba327111819dea144da6d1d10b82c9c
tree4513b738bb8bede053d080448f482c55448a731e
parent502af90868a9fe58a59ebd0d6c2ff960ce897335
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>
C4/Calendar.pm
t/db_dependent/Holidays.t