|
Description
Nick Clemens (kidclamp)
2023-04-25 21:25:19 UTC
Created attachment 150223 [details] [review] Bug 33611: WIP - needs tests Hum, wondering if this is not safer to fix it in dt_from_string actually. Created attachment 150294 [details] [review] Bug 33611: Unit test Created attachment 150295 [details] [review] 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 Created attachment 150463 [details] [review] Bug 33611: Unit test Signed-off-by: David Nind <david@davidnind.com> Created attachment 150464 [details] [review] 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> Created attachment 150519 [details] [review] Bug 33611: Unit test Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 150520 [details] [review] 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> Is this bug https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32563 about the same problem as this one? *** Bug 32563 has been marked as a duplicate of this bug. *** Created attachment 150797 [details] [review] 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> Created attachment 150798 [details] [review] 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> Pushed to master for 23.05. Nice work everyone, thanks! Nice work everyone! Pushed to stable for 22.11.x Missing dependencies for 22.05.x, no backport. |