[Bug 16672] New: Add ability to remove expired holidays from special_holidays
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16672 Bug ID: 16672 Summary: Add ability to remove expired holidays from special_holidays Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org It would be very helpful if the cleanup_database.pl script had the ability to delete holidays from the special_holidays table there were older than a given number of days in the past. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16672 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16672 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16672 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 52081 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52081&action=edit Bug 16672 - Add ability to remove expired holidays from special_holidays It would be very helpful if the cleanup_database.pl script had the ability to delete holidays from the special_holidays table there were older than a given number of days in the past. Test Plan: 1) Apply this patch 2) Create some unique holidays in the past of varying ages 3) Test the new switch '--unique-holidays DAYS' for cleanup_database.pl 4) Verify only holidays older then the specified number of days are removed NOTE: The language 'unique holdays' is used in the interface to match it's use in the staff web interface. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16672 Florent Mara <florent.mara@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |florent.mara@gmail.com Status|Needs Signoff |Signed Off --- Comment #2 from Florent Mara <florent.mara@gmail.com> --- Inserted 3 entries using the following on June 7th 2016: INSERT INTO special_holidays(branchcode, day, month, year, isexception, description) VALUES ('FFL', 1, 6, 2016, 1, 'description1'), ('FFL', 2, 6, 2016, 1, 'description2'), ('FFL', 3, 6, 2016, 1, 'description3'); Ran cleanup_database using the new switch: # perl misc/cronjobs/cleanup_database.pl --unique-holidays 5 Only 2 entries were remaining in table `special_holidays`. Then ran the same switch with the verbose flag # perl misc/cronjobs/cleanup_database.pl --unique-holidays 4 --verbose Removed 1 unqiue holidays One entry was left in table `special_holidays`. This patch works as expected. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16672 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- The script accepts negative numbers, is it expected? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16672 --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 52342 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52342&action=edit Bug 16672 [QA Followup] - Convert negative days to positive days -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16672 --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #3)
The script accepts negative numbers, is it expected?
That seems like inadvisable behavior. I can't imagine needing to automatically delete holidays in the future! I can imagine the thought process of thinking about days in the past as a negative number. I've added a following that simply makes it so a days of 20 or -20 would both remove holidays older than 20 days in the past. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16672 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16672 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #52081|0 |1 is obsolete| | Attachment #52342|0 |1 is obsolete| | --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 52353 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52353&action=edit Bug 16672 - Add ability to remove expired holidays from special_holidays It would be very helpful if the cleanup_database.pl script had the ability to delete holidays from the special_holidays table there were older than a given number of days in the past. Test Plan: 1) Apply this patch 2) Create some unique holidays in the past of varying ages 3) Test the new switch '--unique-holidays DAYS' for cleanup_database.pl 4) Verify only holidays older then the specified number of days are removed NOTE: The language 'unique holdays' is used in the interface to match it's use in the staff web interface. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16672 --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 52354 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52354&action=edit Bug 16672 [QA Followup] - Convert negative days to positive days Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16672 --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 52355 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52355&action=edit Bug 16672: Fix typo unqiue vs unique Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16672 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for Koha 16.11, thanks for the followup Jonathan! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16672 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16672 --- Comment #10 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- *** Bug 13409 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org