Bug 21562

Summary: Sorting on checkout date is broken
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: CirculationAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: normal    
Priority: P5 - low CC: alexbuckley, david.roberts, fridolin.somers, gmcharlt, jonathan.druart, kyle.m.hall, martin.renvoize, nick
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 21777    
Attachments: Bug 21562: Fix sort by checkout date in the circulation table
Bug 21562: Fix sort by checkout date in the circulation table
Bug 21562: Fix sort by checkout date in the circulation table

Description Katrin Fischer 2018-10-12 12:21:42 UTC
Checkouts can't be sorted correctly by checkout date depending on the dateformat system preference setting.

Verfied in 16.11 and 17.11 so far.
Comment 1 Katrin Fischer 2018-10-12 12:25:59 UTC
To test:
- Go to a patron accont with checkouts from different dates
- Sort by checkout date and verify if the sequence is correct
- Repeat with different dateformat system preference settings (dd.mm.yyy especially)
-
Comment 2 Jonathan Druart 2018-10-22 19:34:45 UTC
Confirmed on master.
Comment 3 Jonathan Druart 2018-10-22 19:56:03 UTC
Created attachment 80988 [details] [review]
Bug 21562: Fix sort by checkout date in the circulation table

The sort is done in SQL but resort by DataTables when displaying the
results.
iDataSort should be used to mimick date_due sort behavior.

Test plan:
- Check some items out
- Modify the checkout and due dates, like:
    2018-10-22
    2018-01-23
    2018-05-27
- Sort by checkout date, then due date. The sort should be correct for
all values of the DateFormat syspref
Comment 4 Alex Buckley 2018-10-24 20:46:41 UTC
Created attachment 81090 [details] [review]
Bug 21562: Fix sort by checkout date in the circulation table

The sort is done in SQL but resort by DataTables when displaying the
results.
iDataSort should be used to mimick date_due sort behavior.

Test plan:
- Check some items out
- Modify the checkout and due dates, like:
    2018-10-22
    2018-01-23
    2018-05-27
- Sort by checkout date, then due date. The sort should be correct for
all values of the DateFormat syspref

Followed test plan, patch works as described and passes QA test tool

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Comment 5 Katrin Fischer 2018-10-26 14:30:06 UTC
Created attachment 81294 [details] [review]
Bug 21562: Fix sort by checkout date in the circulation table

The sort is done in SQL but resort by DataTables when displaying the
results.
iDataSort should be used to mimick date_due sort behavior.

Test plan:
- Check some items out
- Modify the checkout and due dates, like:
    2018-10-22
    2018-01-23
    2018-05-27
- Sort by checkout date, then due date. The sort should be correct for
all values of the DateFormat syspref

Followed test plan, patch works as described and passes QA test tool

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Nick Clemens 2018-10-26 17:16:23 UTC
Awesome work all!

Pushed to master for 18.11
Comment 7 Martin Renvoize 2018-11-06 13:47:18 UTC
Pushed to 18.05.x for 18.05.06
Comment 8 Fridolin Somers 2018-11-28 10:18:11 UTC
I prefer not to touch this very important part in 17.11.x.
Its a minor impact.
Comment 9 Katrin Fischer 2019-01-14 20:35:13 UTC
*** Bug 18396 has been marked as a duplicate of this bug. ***