Bug 26664 - Inventory: Sorting column 'Last seen' goes wrong
Summary: Inventory: Sorting column 'Last seen' goes wrong
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Katrin Fischer
QA Contact: Testopia
URL:
Keywords: Academy
Depends on:
Blocks: 25897
  Show dependency treegraph
 
Reported: 2020-10-13 09:50 UTC by Christian Stelzenmüller
Modified: 2020-11-04 12:04 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Text to go in the release notes:
Version(s) released in:
20.11.00


Attachments
Bug 26664: Fix sorting for date last seen in inventory tool (2.22 KB, patch)
2020-10-16 00:53 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 26664: Fix sorting for date last seen in inventory tool (2.27 KB, patch)
2020-10-25 20:46 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 26664: Fix sorting for date last seen in inventory tool (2.34 KB, patch)
2020-11-03 08:12 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 26664: (QA follow-up) Add filters (1.09 KB, patch)
2020-11-03 08:12 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 Christian Stelzenmüller 2020-10-13 09:50:33 UTC
The column 'Last seen' on the results page of inventory.pl doesn't sort correctly. Only the date is taken into account, not the whole date.

That was already described in Bug 24601, but here on the page inventory.pl.

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24601
Comment 1 Christian Stelzenmüller 2020-10-13 09:51:27 UTC
I mean day, not date
Comment 2 Katrin Fischer 2020-10-16 00:53:31 UTC
Created attachment 111822 [details] [review]
Bug 26664: Fix sorting for date last seen in inventory tool

This adds the standard datatable sorting for dates to the inventory
table as described here:
https://wiki.koha-community.org/wiki/DataTables_HowTo#Sorting_dates_regardless_of_date_format_preference

To test:
- Go to the inventory tool
- Search for a big sample list of items with different date last seen
- Sort the table now by "date last seen" by clicking on the table header cell
- Try different settings of the DateFormat system preferences
- Verify sorting is incorrect (alphabetic, not by date)
- Apply patch
- Repeat testing and very all is sorting correctly now
Comment 3 Chris Cormack 2020-10-25 20:46:18 UTC
Created attachment 112482 [details] [review]
Bug 26664: Fix sorting for date last seen in inventory tool

This adds the standard datatable sorting for dates to the inventory
table as described here:
https://wiki.koha-community.org/wiki/DataTables_HowTo#Sorting_dates_regardless_of_date_format_preference

To test:
- Go to the inventory tool
- Search for a big sample list of items with different date last seen
- Sort the table now by "date last seen" by clicking on the table header cell
- Try different settings of the DateFormat system preferences
- Verify sorting is incorrect (alphabetic, not by date)
- Apply patch
- Repeat testing and very all is sorting correctly now

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Comment 4 Martin Renvoize 2020-11-03 08:12:40 UTC
Created attachment 112890 [details] [review]
Bug 26664: Fix sorting for date last seen in inventory tool

This adds the standard datatable sorting for dates to the inventory
table as described here:
https://wiki.koha-community.org/wiki/DataTables_HowTo#Sorting_dates_regardless_of_date_format_preference

To test:
- Go to the inventory tool
- Search for a big sample list of items with different date last seen
- Sort the table now by "date last seen" by clicking on the table header cell
- Try different settings of the DateFormat system preferences
- Verify sorting is incorrect (alphabetic, not by date)
- Apply patch
- Repeat testing and very all is sorting correctly now

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Martin Renvoize 2020-11-03 08:12:43 UTC
Created attachment 112891 [details] [review]
Bug 26664: (QA follow-up) Add filters

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize 2020-11-03 08:13:14 UTC
Works as expected; passes QA tests (with follow-up)

Passing QA
Comment 7 Jonathan Druart 2020-11-04 12:04:00 UTC
Pushed to master for 20.11, thanks to everybody involved!