Bug 21562 - Sorting on checkout date is broken
Summary: Sorting on checkout date is broken
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Katrin Fischer
URL:
Keywords:
: 18396 (view as bug list)
Depends on:
Blocks: 21777
  Show dependency treegraph
 
Reported: 2018-10-12 12:21 UTC by Katrin Fischer
Modified: 2020-01-06 20:15 UTC (History)
8 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:


Attachments
Bug 21562: Fix sort by checkout date in the circulation table (2.82 KB, patch)
2018-10-22 19:56 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21562: Fix sort by checkout date in the circulation table (2.94 KB, patch)
2018-10-24 20:46 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 21562: Fix sort by checkout date in the circulation table (3.00 KB, patch)
2018-10-26 14:30 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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. ***