Bug 26664

Summary: Inventory: Sorting column 'Last seen' goes wrong
Product: Koha Reporter: Christian Stelzenmüller <christian.stelzenmueller>
Component: ToolsAssignee: Katrin Fischer <katrin.fischer>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: martin.renvoize
Version: masterKeywords: Academy
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24601
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.11.00
Bug Depends on:    
Bug Blocks: 25897    
Attachments: Bug 26664: Fix sorting for date last seen in inventory tool
Bug 26664: Fix sorting for date last seen in inventory tool
Bug 26664: Fix sorting for date last seen in inventory tool
Bug 26664: (QA follow-up) Add filters

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!