[Bug 25723] New: Drop DateTime::Set as a dependancy
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Bug ID: 25723 Summary: Drop DateTime::Set as a dependancy Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org DateTime::Set is used in one place and one place only, and we only utilise a single method from it. We should replace that occurrence, exception_holidays, with logic matching that from 'single_holidays' which achieves the same end. I will attempt to do that and profile the difference too. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |14315 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14315 [Bug 14315] Slow checkouts, caused by many 'special_holidays' definitions -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #1 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 105789 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105789&action=edit Bug 25723: Drop DateTime::Set dependancy This patch removes our use of DateTime::Set and replaces it with a quick hashref implimentation -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@ptfs-europe |ity.org |.com -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #2 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 105792 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105792&action=edit Bug 25723: [DO NOT PUSH] Benchmark Script A quick benchmark to compare DateTime::Set->contains to a simple hashref lookup -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105789|0 |1 is obsolete| | --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 105793 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105793&action=edit Bug 25723: Drop DateTime::Set dependancy This patch removes our use of DateTime::Set and replaces it with a quick hashref implimentation -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- t/db_dependent/Holidays.t is failing # Failed test 'No tests run for subtest "exception_holidays() tests"' # at t/db_dependent/Holidays.t line 79. Can't locate object method "iterator" via package "0" (perhaps you forgot to load "0"?) at t/db_dependent/Holidays.t line 67. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105792|0 |1 is obsolete| | --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 105830 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105830&action=edit Bug 25723: [DO NOT PUSH] Benchmark Script A quick benchmark to compare DateTime::Set->contains to a simple hashref lookup -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105793|0 |1 is obsolete| | --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 105831 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105831&action=edit Bug 25723: Drop DateTime::Set dependancy This patch removes our use of DateTime::Set and replaces it with a quick hashref implimentation -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 105832 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105832&action=edit Bug 25723: (follow-up) Fix Unit Test The unit test previously relied on the internals of exception_holidays. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105830|0 |1 is obsolete| | --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 105833 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105833&action=edit Bug 25723: [DO NOT PUSH] Benchmark Script A quick benchmark to compare DateTime::Set->contains to a simple hashref lookup -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105831|0 |1 is obsolete| | --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 105834 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105834&action=edit Bug 25723: Drop DateTime::Set dependancy This patch removes our use of DateTime::Set and replaces it with a quick hashref implimentation -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105832|0 |1 is obsolete| | --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 105835 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105835&action=edit Bug 25723: (follow-up) Fix Unit Test The unit test previously relied on the internals of exception_holidays. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 105836 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105836&action=edit Bug 25723: Drop DateTime::Set from cpanfile -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |18519 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18519 [Bug 18519] Add ability to skip irrelevant dates in Koha::Calendar -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|14315 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14315 [Bug 14315] Slow checkouts, caused by many 'special_holidays' definitions -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com, | |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Jonathan Field <jonathan.field@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.field@ptfs-europe. | |com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Should not we use the same code for single_holidays? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- (In reply to Jonathan Druart from comment #12)
Should not we use the same code for single_holidays?
See bug 18519 😉 where I convert single holidays to use the hashref logic I settled on here. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #14 from David Cook <dcook@prosentient.com.au> --- Hurray for getting rid of unnecessary dependencies :D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Drop DateTime::Set as a |Improve efficiency of |dependancy |holiday calculation -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |barton@bywatersolutions.com --- Comment #15 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- *** Bug 18519 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|18519 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18519 [Bug 18519] Add ability to skip irrelevant dates in Koha::Calendar -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #16 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- *** Bug 14315 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #17 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 105936 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105936&action=edit Bug 25723: Use a hasref for lookup Rather than using an array of dates and iterating them, use a hashref and do a direct lookup -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #18 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 105937 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105937&action=edit Bug 25723: Use the same code for single and exception holidays -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #19 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Jonathan Druart from comment #17)
Created attachment 105936 [details] [review] Bug 25723: Use a hasref for lookup
Rather than using an array of dates and iterating them, use a hashref and do a direct lookup
Patch moved from bug 18519. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #20 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 105939 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105939&action=edit Bug 25723: [ALTERNATIVE] Use the same code for single and exception holidays This patch refactors is_exception_holiday and is_single_holiday to utilise a single _holidays method which combines the logic of the previous single_holidays and exception_holidays methods. As Koha::Calendar is instantiated at a branch level, we also move split the cache into branches too. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #21 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- If you like the alternative implementation of _holidays in my final patch, I will continue on it and update the cache flushing mechanisms to reflect the updated cache key and logic. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105939|0 |1 is obsolete| | --- Comment #22 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 105941 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105941&action=edit Bug 25723: [ALTERNATIVE] Use the same code for single and exception holidays This patch refactors is_exception_holiday and is_single_holiday to utilise a single _holidays method which combines the logic of the previous single_holidays and exception_holidays methods. As Koha::Calendar is instantiated at a branch level, we also move split the cache into branches too. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105937|0 |1 is obsolete| | Attachment #105941|0 |1 is obsolete| | --- Comment #23 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 105947 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105947&action=edit Bug 25723: Use the same code for single and exception holidays This patch refactors is_exception_holiday and is_single_holiday to utilise a single _holidays method which combines the logic of the previous single_holidays and exception_holidays methods. As Koha::Calendar is instantiated at a branch level, we also move split the cache into branches too. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105833|0 |1 is obsolete| | --- Comment #24 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 105954 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105954&action=edit Bug 25723: [DO NOT PUSH] Benchmark Script A quick benchmark to compare DateTime::Set->contains to a simple hashref lookup -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105834|0 |1 is obsolete| | --- Comment #25 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 105955 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105955&action=edit Bug 25723: Drop DateTime::Set dependancy This patch removes our use of DateTime::Set and replaces it with a quick hashref implimentation -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105835|0 |1 is obsolete| | --- Comment #26 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 105956 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105956&action=edit Bug 25723: (follow-up) Fix Unit Test The unit test previously relied on the internals of exception_holidays. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105836|0 |1 is obsolete| | --- Comment #27 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 105957 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105957&action=edit Bug 25723: Drop DateTime::Set from cpanfile -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105936|0 |1 is obsolete| | --- Comment #28 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 105958 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105958&action=edit Bug 25723: Use a hasref for lookup Rather than using an array of dates and iterating them, use a hashref and do a direct lookup -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105947|0 |1 is obsolete| | --- Comment #29 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 105959 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105959&action=edit Bug 25723: Use the same code for single and exception holidays This patch refactors is_exception_holiday and is_single_holiday to utilise a single _holidays method which combines the logic of the previous single_holidays and exception_holidays methods. As Koha::Calendar is instantiated at a branch level, we also move split the cache into branches too. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #30 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 105960 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105960&action=edit Bug 25723: Update cache flushing calls This patch updates the previous single_holidays and exeption_holidays cache flushing calls to match the new cache key structure of the updated routines. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #31 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 105961 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105961&action=edit Bug 25723: Remove tests for removed method We removed the exception_holidays (and single_holidays) methods as part of this patchset. As such, we should no longer test them ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105954|0 |1 is obsolete| | --- Comment #32 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 105962 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105962&action=edit Bug 25723: [DO NOT PUSH] Benchmark Script A quick benchmark to compare DateTime::Set->contains to a simple hashref lookup -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105955|0 |1 is obsolete| | --- Comment #33 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 105963 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105963&action=edit Bug 25723: Drop DateTime::Set dependancy This patch removes our use of DateTime::Set and replaces it with a quick hashref implimentation -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105956|0 |1 is obsolete| | --- Comment #34 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 105964 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105964&action=edit Bug 25723: (follow-up) Fix Unit Test The unit test previously relied on the internals of exception_holidays. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105957|0 |1 is obsolete| | --- Comment #35 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 105965 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105965&action=edit Bug 25723: Drop DateTime::Set from cpanfile -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105958|0 |1 is obsolete| | --- Comment #36 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 105966 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105966&action=edit Bug 25723: Use a hasref for lookup Rather than using an array of dates and iterating them, use a hashref and do a direct lookup -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105959|0 |1 is obsolete| | --- Comment #37 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 105967 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105967&action=edit Bug 25723: Use the same code for single and exception holidays This patch refactors is_exception_holiday and is_single_holiday to utilise a single _holidays method which combines the logic of the previous single_holidays and exception_holidays methods. As Koha::Calendar is instantiated at a branch level, we also move split the cache into branches too. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105960|0 |1 is obsolete| | --- Comment #38 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 105968 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105968&action=edit Bug 25723: Update cache flushing calls This patch updates the previous single_holidays and exeption_holidays cache flushing calls to match the new cache key structure of the updated routines. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105961|0 |1 is obsolete| | --- Comment #39 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 105969 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105969&action=edit Bug 25723: Remove tests for removed method We removed the exception_holidays (and single_holidays) methods as part of this patchset. As such, we should no longer test them ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #40 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 105970 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105970&action=edit Bug 25723: (QA follow-up) Silent POD warning I didn't introduce the method that is warned about, but adding POD for it seemed reasonable and will silence the QA Script warning. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |25781 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25781 [Bug 25781] Remove duplicate days_forward method from Koha::Calendar -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=25850 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |RM_priority -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |emma.perks@heartofengland.n | |hs.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #41 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- We have this work deployed at a couple of sites now and hope to provide a signoff soon. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #42 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Tested and signed off by Heart of England NHS Trust. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=26000 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #43 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- At Nicks request I checked the backportability of this patchset (in relation to bug 26000 being identified as a bug whilst this patchset fixes that bug but also enhances the performance too). The patchset applies without issue to 20.05 and applies with minor changes to 19.11 and 19.05 branches (cpanfile doesn't exist yet in those branches) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105962|0 |1 is obsolete| | Attachment #105963|0 |1 is obsolete| | Attachment #105964|0 |1 is obsolete| | Attachment #105965|0 |1 is obsolete| | Attachment #105966|0 |1 is obsolete| | Attachment #105967|0 |1 is obsolete| | Attachment #105968|0 |1 is obsolete| | Attachment #105969|0 |1 is obsolete| | Attachment #105970|0 |1 is obsolete| | --- Comment #44 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 106991 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106991&action=edit Bug 25723: [DO NOT PUSH] Benchmark Script A quick benchmark to compare DateTime::Set->contains to a simple hashref lookup Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #45 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 106992 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106992&action=edit Bug 25723: Drop DateTime::Set dependancy This patch removes our use of DateTime::Set and replaces it with a quick hashref implimentation Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #46 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 106993 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106993&action=edit Bug 25723: (follow-up) Fix Unit Test The unit test previously relied on the internals of exception_holidays. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #47 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 106994 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106994&action=edit Bug 25723: Drop DateTime::Set from cpanfile Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #48 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 106995 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106995&action=edit Bug 25723: Use a hasref for lookup Rather than using an array of dates and iterating them, use a hashref and do a direct lookup Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #49 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 106996 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106996&action=edit Bug 25723: Use the same code for single and exception holidays This patch refactors is_exception_holiday and is_single_holiday to utilise a single _holidays method which combines the logic of the previous single_holidays and exception_holidays methods. As Koha::Calendar is instantiated at a branch level, we also move split the cache into branches too. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #50 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 106997 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106997&action=edit Bug 25723: Update cache flushing calls This patch updates the previous single_holidays and exeption_holidays cache flushing calls to match the new cache key structure of the updated routines. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #51 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 106998 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106998&action=edit Bug 25723: Remove tests for removed method We removed the exception_holidays (and single_holidays) methods as part of this patchset. As such, we should no longer test them ;) Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #52 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 106999 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106999&action=edit Bug 25723: (QA follow-up) Silent POD warning I didn't introduce the method that is warned about, but adding POD for it seemed reasonable and will silence the QA Script warning. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #53 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 107000 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107000&action=edit Bug 25723: (QA follow-up) Handle holiday and exception on same day When a holiday is entered, then exceptions generated on a range, there exists both a holiday and exception in the special holidays table. We should cache the exception over the holiday instead of both Also, !1 in perl returns '' rather than 0, so we should explicitly set the value Add blank line to clear pod error from qa tools Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |joonas.kylmala@helsinki.fi |y.org | CC| |joonas.kylmala@helsinki.fi -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #54 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- (In reply to Nick Clemens from comment #53)
Created attachment 107000 [details] [review] Bug 25723: (QA follow-up) Handle holiday and exception on same day
When a holiday is entered, then exceptions generated on a range, there exists both a holiday and exception in the special holidays table. We should cache the exception over the holiday instead of both
Also, !1 in perl returns '' rather than 0, so we should explicitly set the value
Add blank line to clear pod error from qa tools
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Good catch and an elegant solution.. thanks :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #106991|0 |1 is obsolete| | --- Comment #55 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 107001 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107001&action=edit Bug 25723: [DO NOT PUSH] Benchmark Script A quick benchmark to compare DateTime::Set->contains to a simple hashref lookup Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #106992|0 |1 is obsolete| | --- Comment #56 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 107002 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107002&action=edit Bug 25723: Drop DateTime::Set dependancy This patch removes our use of DateTime::Set and replaces it with a quick hashref implimentation Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #106993|0 |1 is obsolete| | --- Comment #57 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 107003 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107003&action=edit Bug 25723: (follow-up) Fix Unit Test The unit test previously relied on the internals of exception_holidays. Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #106994|0 |1 is obsolete| | --- Comment #58 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 107004 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107004&action=edit Bug 25723: Drop DateTime::Set from cpanfile Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #106995|0 |1 is obsolete| | --- Comment #59 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 107005 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107005&action=edit Bug 25723: Use a hasref for lookup Rather than using an array of dates and iterating them, use a hashref and do a direct lookup Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #106996|0 |1 is obsolete| | --- Comment #60 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 107006 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107006&action=edit Bug 25723: Use the same code for single and exception holidays This patch refactors is_exception_holiday and is_single_holiday to utilise a single _holidays method which combines the logic of the previous single_holidays and exception_holidays methods. As Koha::Calendar is instantiated at a branch level, we also move split the cache into branches too. Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #106997|0 |1 is obsolete| | --- Comment #61 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 107007 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107007&action=edit Bug 25723: Update cache flushing calls This patch updates the previous single_holidays and exeption_holidays cache flushing calls to match the new cache key structure of the updated routines. Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #106998|0 |1 is obsolete| | --- Comment #62 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 107008 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107008&action=edit Bug 25723: Remove tests for removed method We removed the exception_holidays (and single_holidays) methods as part of this patchset. As such, we should no longer test them ;) Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #106999|0 |1 is obsolete| | --- Comment #63 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 107009 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107009&action=edit Bug 25723: (QA follow-up) Silent POD warning I didn't introduce the method that is warned about, but adding POD for it seemed reasonable and will silence the QA Script warning. Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #64 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 107010 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107010&action=edit Bug 25723: (QA follow-up) Handle holiday and exception on same day When a holiday is entered, then exceptions generated on a range, there exists both a holiday and exception in the special holidays table. We should cache the exception over the holiday instead of both Also, !1 in perl returns '' rather than 0, so we should explicitly set the value Add blank line to clear pod error from qa tools Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #65 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Restored SO lines for Emma and added my own to Nicks followup.. thanks Nick. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #107000|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Joonas Kylmälä <joonas.kylmala@helsinki.fi> 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=25723 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #107001|0 |1 is obsolete| | Attachment #107002|0 |1 is obsolete| | Attachment #107003|0 |1 is obsolete| | Attachment #107004|0 |1 is obsolete| | Attachment #107005|0 |1 is obsolete| | Attachment #107006|0 |1 is obsolete| | Attachment #107007|0 |1 is obsolete| | Attachment #107008|0 |1 is obsolete| | Attachment #107009|0 |1 is obsolete| | Attachment #107010|0 |1 is obsolete| | --- Comment #66 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Created attachment 107013 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107013&action=edit Bug 25723: [DO NOT PUSH] Benchmark Script A quick benchmark to compare DateTime::Set->contains to a simple hashref lookup Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #67 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Created attachment 107014 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107014&action=edit Bug 25723: Drop DateTime::Set dependancy This patch removes our use of DateTime::Set and replaces it with a quick hashref implimentation Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #68 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Created attachment 107015 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107015&action=edit Bug 25723: (follow-up) Fix Unit Test The unit test previously relied on the internals of exception_holidays. Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #69 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Created attachment 107016 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107016&action=edit Bug 25723: Drop DateTime::Set from cpanfile Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #70 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Created attachment 107017 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107017&action=edit Bug 25723: Use a hasref for lookup Rather than using an array of dates and iterating them, use a hashref and do a direct lookup Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #71 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Created attachment 107018 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107018&action=edit Bug 25723: Use the same code for single and exception holidays This patch refactors is_exception_holiday and is_single_holiday to utilise a single _holidays method which combines the logic of the previous single_holidays and exception_holidays methods. As Koha::Calendar is instantiated at a branch level, we also move split the cache into branches too. Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #72 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Created attachment 107019 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107019&action=edit Bug 25723: Update cache flushing calls This patch updates the previous single_holidays and exeption_holidays cache flushing calls to match the new cache key structure of the updated routines. Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #73 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Created attachment 107020 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107020&action=edit Bug 25723: Remove tests for removed method We removed the exception_holidays (and single_holidays) methods as part of this patchset. As such, we should no longer test them ;) Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #74 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Created attachment 107021 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107021&action=edit Bug 25723: (QA follow-up) Silent POD warning I didn't introduce the method that is warned about, but adding POD for it seemed reasonable and will silence the QA Script warning. Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #75 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Created attachment 107022 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107022&action=edit Bug 25723: (QA follow-up) Handle holiday and exception on same day When a holiday is entered, then exceptions generated on a range, there exists both a holiday and exception in the special holidays table. We should cache the exception over the holiday instead of both Also, !1 in perl returns '' rather than 0, so we should explicitly set the value Add blank line to clear pod error from qa tools Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Re-introduce the blank line mentioned in the commit message, it was accidentally removed by automatic formatting Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #76 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Created attachment 107023 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107023&action=edit Bug 25723: (QA follow-up) Remove unused module import The last usage of this module was removed in the commit "Bug 25723: Update cache flushing calls" but the import was not removed along with it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #77 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Created attachment 107025 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107025&action=edit Bug 25723: (QA follow-up) Remove libdatetime-set-perl dependency All usage to this module was removed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #78 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- I added the two follow-up qa commits, would still like to someone go over them also just to make sure it's all good, although they are pretty trivial. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #79 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Adding Mason to the cc list.. am I right in thinking the control file change gets taken care of as part of packaging/ci processes and is built from the cpanfile update I included here.. or should we now be looking for and submitting control file updates inline with bugs? Thanks so much for testing and QAing everyone :) Those followups look great to me Joonas, good catch on the no longer required import :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #107025|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #80 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- (In reply to Martin Renvoize from comment #79)
Adding Mason to the cc list.. am I right in thinking the control file change gets taken care of as part of packaging/ci processes and is built from the cpanfile update I included here.. or should we now be looking for and submitting control file updates inline with bugs?
You are right, missed the comment on top of the control file. I obsoleted that patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #81 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 20.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|20.11.00 |20.11.00, 20.05.03 released in| | CC| |lucas@bywatersolutions.com --- Comment #82 from Lucas Gass <lucas@bywatersolutions.com> --- backported to 20.05.x for 20.05.03 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aleisha@catalyst.net.nz --- Comment #83 from Aleisha Amohia <aleisha@catalyst.net.nz> --- enhancement, not backported to 19.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 --- Comment #84 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Aleisha Amohia from comment #83)
enhancement, not backported to 19.11.x
This also fixes a bug, please consider backporting, or picking bug 26000 as an alternative -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25723 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|RM_priority | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org