Bug 18874 - Add unique constraint to repeatable_holidays and special_holidays
Summary: Add unique constraint to repeatable_holidays and special_holidays
Status: RESOLVED DUPLICATE of bug 24289
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: master
Hardware: All All
: P5 - low trivial (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
: 18520 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-06-28 14:30 UTC by Baptiste
Modified: 2020-01-20 07:02 UTC (History)
6 users (show)

See Also:
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 (1.02 KB, patch)
2017-06-28 14:34 UTC, Baptiste
Details | Diff | Splinter Review
Bug 18874: Add unicity constraint (1.07 KB, patch)
2017-07-10 15:06 UTC, Lee Jamison
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 ***