[Bug 33611] New: Holds being placed in the future if DefaultHoldExpirationdate is set
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33611 Bug ID: 33611 Summary: Holds being placed in the future if DefaultHoldExpirationdate is set Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Hold requests Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com Bug 30718 altered C4::Reserves::AddReserve to use either the date passed in, or a dt_from_string object When storing the hold, we call Koha::Hold::_set_default_expirationdate This assumed reservedate was always a string, and used it to create a dt object, and add days for the expiration. Now that reservedate is already a dt object, this means we add the days to the object, so the reservedate is set into the future, as well as the expiration To recreate 1 - Set DefaultHoldExpiration to Set 2 - Set DefaultHoldExpirationPeriod to 365 3 - Set DefaultHoldExpirationunitOfTimeToDays 4 - Place a hold 5 - Note reserve date is 1 year in the future, same as expiration -- 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=33611 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 150223 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150223&action=edit Bug 33611: WIP - needs tests -- 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=33611 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |30718 CC| |jonathan.druart+koha@gmail. | |com Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30718 [Bug 30718] Use flatpickr's altInput option everywhere -- 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=33611 --- Comment #2 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Hum, wondering if this is not safer to fix it in dt_from_string actually. -- 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=33611 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=33611 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #150223|0 |1 is obsolete| | --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 150294 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150294&action=edit Bug 33611: Unit test -- 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=33611 --- Comment #4 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 150295 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150295&action=edit Bug 33611: Ensure dt_from_string always returns a new object This patch alters dt_from_string to pass a cloned object if called on an existing date time object This resolves an issue where a holds reserve date was being altered when the default expiration date was set To test: 1 - Set DefaultHoldExpiration to Set 2 - Set DefaultHoldExpirationPeriod to 365 3 - Set DefaultHoldExpirationunitOfTimeToDays 4 - Place a hold 5 - Note reserve date is 1 year in the future, same as expiration 6 - Apply patch 7 - Restart all 8 - Place another hold 9 - Note reserve date is set to today -- 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=33611 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- 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=33611 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33611 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #150294|0 |1 is obsolete| | --- Comment #5 from David Nind <david@davidnind.com> --- Created attachment 150463 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150463&action=edit Bug 33611: Unit test Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33611 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #150295|0 |1 is obsolete| | --- Comment #6 from David Nind <david@davidnind.com> --- Created attachment 150464 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150464&action=edit Bug 33611: Ensure dt_from_string always returns a new object This patch alters dt_from_string to pass a cloned object if called on an existing date time object This resolves an issue where a holds reserve date was being altered when the default expiration date was set To test: 1 - Set DefaultHoldExpiration to Set 2 - Set DefaultHoldExpirationPeriod to 365 3 - Set DefaultHoldExpirationunitOfTimeToDays 4 - Place a hold 5 - Note reserve date is 1 year in the future, same as expiration 6 - Apply patch 7 - Restart all 8 - Place another hold 9 - Note reserve date is set to today Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33611 Jonathan Druart <jonathan.druart+koha@gmail.com> 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=33611 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #150463|0 |1 is obsolete| | Attachment #150464|0 |1 is obsolete| | --- Comment #7 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 150519 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150519&action=edit Bug 33611: Unit test Signed-off-by: David Nind <david@davidnind.com> 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=33611 --- Comment #8 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 150520 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150520&action=edit Bug 33611: Ensure dt_from_string always returns a new object This patch alters dt_from_string to pass a cloned object if called on an existing date time object This resolves an issue where a holds reserve date was being altered when the default expiration date was set To test: 1 - Set DefaultHoldExpiration to Set 2 - Set DefaultHoldExpirationPeriod to 365 3 - Set DefaultHoldExpirationunitOfTimeToDays 4 - Place a hold 5 - Note reserve date is 1 year in the future, same as expiration 6 - Apply patch 7 - Restart all 8 - Place another hold 9 - Note reserve date is set to today Signed-off-by: David Nind <david@davidnind.com> 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=33611 Anneli Österman <anneli.osterman@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |anneli.osterman@koha-suomi. | |fi --- Comment #9 from Anneli Österman <anneli.osterman@koha-suomi.fi> --- Is this bug https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32563 about the same problem as this one? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33611 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |slavashishkin@gmail.com --- Comment #10 from Nick Clemens <nick@bywatersolutions.com> --- *** Bug 32563 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=33611 Hinemoea Viault <hinemoea.viault@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #150519|0 |1 is obsolete| | --- Comment #11 from Hinemoea Viault <hinemoea.viault@inlibro.com> --- Created attachment 150797 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150797&action=edit Bug 33611: Unit test Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Hinemoea Viault <hinemoea.viault@inlibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33611 Hinemoea Viault <hinemoea.viault@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #150520|0 |1 is obsolete| | --- Comment #12 from Hinemoea Viault <hinemoea.viault@inlibro.com> --- Created attachment 150798 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150798&action=edit Bug 33611: Ensure dt_from_string always returns a new object This patch alters dt_from_string to pass a cloned object if called on an existing date time object This resolves an issue where a holds reserve date was being altered when the default expiration date was set To test: 1 - Set DefaultHoldExpiration to Set 2 - Set DefaultHoldExpirationPeriod to 365 3 - Set DefaultHoldExpirationunitOfTimeToDays 4 - Place a hold 5 - Note reserve date is 1 year in the future, same as expiration 6 - Apply patch 7 - Restart all 8 - Place another hold 9 - Note reserve date is set to today Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Hinemoea Viault <hinemoea.viault@inlibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33611 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |23.05.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=33611 --- Comment #13 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.05. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33611 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|23.05.00 |23.05.00,22.11.06 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33611 --- Comment #14 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Nice work everyone! Pushed to stable for 22.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33611 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Resolution|--- |FIXED Status|Pushed to stable |RESOLVED --- Comment #15 from Lucas Gass <lucas@bywatersolutions.com> --- Missing dependencies for 22.05.x, no backport. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org