Bug 29459 - Replace some missed datetimepickers in circulation templates with Flatpickr
Summary: Replace some missed datetimepickers in circulation templates with Flatpickr
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 29239
  Show dependency treegraph
 
Reported: 2021-11-11 14:36 UTC by Owen Leonard
Modified: 2022-12-12 21:24 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00


Attachments
Bug 29459: Replace some missed datetimepickers in circulation templates with Flatpickr (10.34 KB, patch)
2021-11-11 15:24 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 29459: Replace some missed datetimepickers in circulation templates with Flatpickr (10.40 KB, patch)
2021-11-15 09:20 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2021-11-11 14:36:16 UTC
My search of the source code for "datepicker" missed some places which referenced only "datetimepicker," resulting in these missed instances:

- Circulation -> Check out -> Override renewal restrictions -> "Renewal due date" and "On hold due date."
- Check in -> Checkin settings -> Specify return date
- ILL requests -> Check out -> Due date.
Comment 1 Owen Leonard 2021-11-11 15:24:27 UTC
Created attachment 127547 [details] [review]
Bug 29459: Replace some missed datetimepickers in circulation templates with Flatpickr

This patch updates a few more instances of jQueryUI datepickers which
were missed initially, replacing them with Flatpickr widgets.

Also changed: A few datetime input fields are updated to have a size of
20, consistent with other datetime input fields.

To test, apply the patch and go to Circulation.

Check in:

- With the 'SpecifyReturnDate' system preference enabled, go to Check
  in.
- Click the "Checkin settings" link.
- Test the "Specify return date" field. Clicking it should trigger a
  Flatpickr widget with a time picker. It should limit your selection to
  dates in the past.
- Check the "Remember return date" checkbox and confirm that the date is
  preserved over page reloads.
- Check and uncheck the "Box drop mode" checkbox to confirm that the
  return date field is disabled and enabled correctly.

Check out:

- With the 'AllowRenewalOnHoldOverride' preference enabled, check out to
  a patron who has a checkout which is on hold for another patron.
- At the bottom of the table of checkouts, click the "Override renewal
  restrictions" checkbox.
- The on-hold checkouts should now have a checkbox in the "Renew"
  column. Check one or more of these checkboxes.
- In the table footer you should now see two date inputs, "Renewal due
  date" and "On hold due date." These should both trigger Flatpickr
  widgets with time pickers.
- Confirm that your date selections are submitted correctly when you
  renew items.

ILL checkout:

- Create a new ILL request with the type "book," filling in at least
  title, patron, and destination library.
- On the "Manage ILL request" page, click "Confirm request" and "Confirm
  request" on the next confirmation page.
- There should now be a "Check out" button in the "Manage ILL request"
  toolbar. Click it.
- Test the "Due date" field. It should trigger a Flatpickr widget with a
  time picker.
Comment 2 Martin Renvoize 2021-11-15 09:20:05 UTC
Created attachment 127622 [details] [review]
Bug 29459: Replace some missed datetimepickers in circulation templates with Flatpickr

This patch updates a few more instances of jQueryUI datepickers which
were missed initially, replacing them with Flatpickr widgets.

Also changed: A few datetime input fields are updated to have a size of
20, consistent with other datetime input fields.

To test, apply the patch and go to Circulation.

Check in:

- With the 'SpecifyReturnDate' system preference enabled, go to Check
  in.
- Click the "Checkin settings" link.
- Test the "Specify return date" field. Clicking it should trigger a
  Flatpickr widget with a time picker. It should limit your selection to
  dates in the past.
- Check the "Remember return date" checkbox and confirm that the date is
  preserved over page reloads.
- Check and uncheck the "Box drop mode" checkbox to confirm that the
  return date field is disabled and enabled correctly.

Check out:

- With the 'AllowRenewalOnHoldOverride' preference enabled, check out to
  a patron who has a checkout which is on hold for another patron.
- At the bottom of the table of checkouts, click the "Override renewal
  restrictions" checkbox.
- The on-hold checkouts should now have a checkbox in the "Renew"
  column. Check one or more of these checkboxes.
- In the table footer you should now see two date inputs, "Renewal due
  date" and "On hold due date." These should both trigger Flatpickr
  widgets with time pickers.
- Confirm that your date selections are submitted correctly when you
  renew items.

ILL checkout:

- Create a new ILL request with the type "book," filling in at least
  title, patron, and destination library.
- On the "Manage ILL request" page, click "Confirm request" and "Confirm
  request" on the next confirmation page.
- There should now be a "Check out" button in the "Manage ILL request"
  toolbar. Click it.
- Test the "Due date" field. It should trigger a Flatpickr widget with a
  time picker.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 3 Martin Renvoize 2021-11-15 09:20:38 UTC
Good catch Owen.. all works as expected for me.  Signing off.
Comment 4 Martin Renvoize 2021-11-15 09:51:32 UTC
As this includes some ILL bits I'm going to take the leap of go for a straight QA as the ILL knowledge in the QA team is limited.. I got some help testing from Andrew (PTFS-E) to test that area.

Passing QA
Comment 5 Jonathan Druart 2021-11-15 10:53:32 UTC
Would have been good to take bug 29394 into account and start the job from here. Not considering blocker however.
Comment 6 Jonathan Druart 2021-11-15 11:40:44 UTC
Pushed to master for 21.11, thanks to everybody involved!