Bug 13982 - Checkouts table not sorting on correct column
Summary: Checkouts table not sorting on correct column
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Kyle M Hall
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-13 10:56 UTC by Kyle M Hall
Modified: 2015-12-03 22:02 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 13982 - Checkouts table not sorting on correct column (1.74 KB, patch)
2015-04-13 11:05 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 13982 - Checkouts table not sorting on correct column (2.26 KB, patch)
2015-04-14 03:01 UTC, M. Tompsett
Details | Diff | Splinter Review
[PASSED QA] Bug 13982 - Checkouts table not sorting on correct column (2.33 KB, patch)
2015-04-19 20:08 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 Kyle M Hall 2015-04-13 10:56:10 UTC
The "Date Due" column for checkouts is using the column index 1 to sort by. This column is the one that is used for grouping items into today's checkouts and previous checkouts. This is definitely not the column that should be used. Instead, we should be using column index 2, which contains the raw unformatted due date.
Comment 1 Kyle M Hall 2015-04-13 11:05:29 UTC Comment hidden (obsolete)
Comment 2 Aleisha Amohia 2015-04-14 00:45:13 UTC
Patch applied cleanly but date is still not sorting correctly.
Will leave as Needs signoff in case I'm testing it wrong
Comment 3 M. Tompsett 2015-04-14 03:01:32 UTC Comment hidden (obsolete)
Comment 4 Kyle M Hall 2015-04-16 12:01:33 UTC
Thanks for signing off Mark! For what it's worth I do not believe there is any possible way this patch will affect the fix for bug 13908, I just added it to the test plan for thoroughness.
Comment 5 Katrin Fischer 2015-04-19 20:08:21 UTC
Created attachment 38140 [details] [review]
[PASSED QA] Bug 13982 - Checkouts table not sorting on correct column

The "Date Due" column for checkouts is using the column index 1 to sort by.
This column is the one that is used for grouping items into today's checkouts
and previous checkouts. This is definitely not the column that should be used.
Instead, we should be using column index 2, which contains the raw unformatted
due date.

Revised Test Plan:
1) Find a patron with no checkouts
2) Check out something as due the beginning on the month.
3) Check out something as due the end of the month.
4) Check out something due tomorrow (hopefully not end of month)
   -- so you should have 2015-04-01, 2015-04-30, and 2015-04-14
      (for example)
5) Attempt to sort by due date
   -- Note the sorting is incorrect
6) Apply this patch
7) Clear your browser cache
8) Reload the page
9) Attempt to sort by due date again
   -- Note the sorting works correctly this time
10) Verify there are no regressions with bug 13908
    -- this will require finding a patron with many checkouts,
       playing with the Circulation system preferences
       previousIssuesDefaultSortOrder and todaysIssuesDefaultSortOrder,
       and understanding what the four different cases mean with
       respect to actually manually sorting the 'Due Date' column.

NOTE: I did not do step 10,
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Tomás Cohen Arazi 2015-05-06 16:57:48 UTC
Patch pushed to master.

Thanks Kyle!
Comment 7 Chris Cormack 2015-05-17 06:32:41 UTC
Pushed to 3.18.x will be in 3.18.7