Bug 34356

Summary: Enabling RecordStaffUserOnCheckout causes bad default sorting in checkout history
Product: Koha Reporter: Jason Robb <jrobb>
Component: PatronsAssignee: Lucas Gass <lucas>
Status: RESOLVED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: trivial    
Priority: P5 - low CC: bugzilla, fridolin.somers, gmcharlt, kyle.m.hall, lucas, rcoert
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.04,22.11.10
Attachments: Bug 34356: Make sort order always default to correct column
Bug 34356: Make sort order always default to correct column
Bug 34356: Make sort order always default to correct column

Description Jason Robb 2023-07-24 13:52:28 UTC
If the syspref RecordStaffUserOnCheckout is enabled, a new column is added patron checkout history to show the staff member who checked the item out to the patron.

When enabled, the default sort moves from 'Date Due' to 'Checked out by' which isn't useful.

To replicate:
- Check out an item to a patron
- View checkout history, default sort is on 'Date due'
- Enable RecordStaffUserOnCheckout
- View checkout history, default sort is on 'Checked out by'

Bug 28891 addressed a similar issue in the past but it seems to be a problem again.
Comment 1 Lucas Gass 2023-08-17 17:27:18 UTC
Created attachment 154571 [details] [review]
Bug 34356: Make sort order always default to correct column

To test:
1- Check out an item to a patron
2- View checkout history, default sort is on 'Date due'
3- Enable RecordStaffUserOnCheckout
4- View checkout history, default sort is on 'Checked out by'
5- Apply patch
6- Table should sort to 'Date due' no matter what the sys pref is set to
Comment 2 ByWater Sandboxes 2023-08-17 19:35:55 UTC
Created attachment 154572 [details] [review]
Bug 34356: Make sort order always default to correct column

To test:
1- Check out an item to a patron
2- View checkout history, default sort is on 'Date due'
3- Enable RecordStaffUserOnCheckout
4- View checkout history, default sort is on 'Checked out by'
5- Apply patch
6- Table should sort to 'Date due' no matter what the sys pref is set to

Signed-off-by: Jason <jrobb@sekls.org>
Comment 3 Jason Robb 2023-08-17 19:36:40 UTC
Fix worked for me, thanks!
Comment 4 Katrin Fischer 2023-08-25 12:04:26 UTC
Created attachment 154805 [details] [review]
Bug 34356: Make sort order always default to correct column

To test:
1- Check out an item to a patron
2- View checkout history, default sort is on 'Date due'
3- Enable RecordStaffUserOnCheckout
4- View checkout history, default sort is on 'Checked out by'
5- Apply patch
6- Table should sort to 'Date due' no matter what the sys pref is set to

Signed-off-by: Jason <jrobb@sekls.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Tomás Cohen Arazi 2023-08-29 17:58:15 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 6 Fridolin Somers 2023-08-30 07:08:14 UTC
Pushed to 23.05.x for 23.05.04
Comment 7 Matt Blenkinsop 2023-08-31 10:24:18 UTC
Nice work everyone!

Pushed to oldstable for 22.11.x