When creating a new request on request.pl, staff cannot set a hold expires on date in the past -- input name="expiration_date". When editing an existing request, however, the new datepicker for editing the expiration date on request.pl does allow for a date to be set in the past -- input name="expirationdate".
Created attachment 105996 [details] [review] Bug 25789: Don't allow past date as holds expiration date When editing existing holds expiration date it's possible to select past date from datepicker. This patch changes expiration inputs class as "datepickerto" to make past dates unselectable. To test: 1. Find item with holds 2. Edit holds expiration date => Note that past dates are selectable 3. Apply patch 4. Edit again => Past dates are no longer selectable Sponsored-by: Koha-Suomi Oy
Also valid in master and patch provided is made against it. Changed version of this bug as 'master'.
Created attachment 106005 [details] [review] Bug 25789: Don't allow past date as holds expiration date When editing existing holds expiration date it's possible to select past date from datepicker. This patch changes expiration inputs class as "datepickerto" to make past dates unselectable. To test: 1. Find item with holds 2. Edit holds expiration date => Note that past dates are selectable 3. Apply patch 4. Edit again => Past dates are no longer selectable Sponsored-by: Koha-Suomi Oy Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 106131 [details] [review] Bug 25789: Don't allow past date as holds expiration date When editing existing holds expiration date it's possible to select past date from datepicker. This patch changes expiration inputs class as "datepickerto" to make past dates unselectable. To test: 1. Find item with holds 2. Edit holds expiration date => Note that past dates are selectable 3. Apply patch 4. Edit again => Past dates are no longer selectable Sponsored-by: Koha-Suomi Oy Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to master for 20.11, thanks to everybody involved!
backported to 20.05.x for 20.05.02
backported to 19.11.x for 19.11.08
Can't backport to 19.05.x, the code doesn't seems to have that part here (a datepicker). Maybe the feature wasn't here, maybe it moved from another file If interested, feel free to investigate further.
For the sake of the release notes, I'm classifying this as a bug rather than an enhancement. Feel free to change it back if you think this is wrong.