Bug 18874

Summary: Add unique constraint to repeatable_holidays and special_holidays
Product: Koha Reporter: Baptiste <baptiste.wojtkowski>
Component: ToolsAssignee: Bugs List <koha-bugs>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: barton, katrin.fischer, ldjamison, mtompset, nick, victor
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 18874: Add unicity constraint
Bug 18874: Add unicity constraint

Description Baptiste 2017-06-28 14:30:57 UTC
The calendar doesn't check if holidays already exist before copying/inserting holidays
Comment 1 Baptiste 2017-06-28 14:34:49 UTC
Created attachment 64705 [details] [review]
Bug 18874: Add unicity constraint
Comment 2 Lee Jamison 2017-07-10 13:56:07 UTC
Baptiste, please provide a test plan and I will gladly test!
Comment 3 Baptiste 2017-07-10 14:18:33 UTC
Hi,
1 - Create holiday for a library
2 - Copy this holidays to a second library
3 - Copy these holidays to the first library
Check in base, you should have a duplicate
4 - Undo changes
5 - Apply patch
6 - Update database and database schema
7 repeat 1-3, it should not duplicate datas
Comment 4 Lee Jamison 2017-07-10 15:06:32 UTC
Created attachment 64970 [details] [review]
Bug 18874: Add unicity constraint

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Comment 5 Nick Clemens 2017-07-21 12:41:01 UTC
This does work, we get errors in the logs with no feedback for user, if the intention is to replace an existing holiday with a different holiday this could be confusing. Perhaps we should perform the check and offer an error/notification?
Comment 6 Mark Tompsett 2017-08-16 03:44:57 UTC
Also, this fails to add the constraint for a fresh install.
Comment 7 Victor Grousset/tuxayo 2018-02-08 13:37:38 UTC
Baptiste doesn't work anymore at BibLibre.
Unassigning to avoid signaling that this bug is still being supervized. Which could wrongly discourage someone to continue the work.
Comment 8 Katrin Fischer 2020-01-11 22:21:01 UTC
*** Bug 18520 has been marked as a duplicate of this bug. ***
Comment 9 Katrin Fischer 2020-01-20 07:02:55 UTC

*** This bug has been marked as a duplicate of bug 24289 ***