Bug 39081

Summary: Fix date and title sorting on batch extend due dates page
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: Pushed to main --- QA Contact: Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski>
Severity: minor    
Priority: P5 - low CC: baptiste.wojtkowski, jonathan.druart, phil
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
25.05.00
Circulation function:
Bug Depends on: 26553    
Bug Blocks: 39289    
Attachments: Bug 39081: Fix date and title sorting on batch extend due dates page
Bug 39081: Fix date and title sorting on batch extend due dates page
Bug 39081: Fix order by due dates
Bug 39081: Adjust the result table
Bug 39081: Allow sort on item type
Bug 39081: Fix date and title sorting on batch extend due dates page
Bug 39081: Fix order by due dates
Bug 39081: Adjust the result table
Bug 39081: Allow sort on item type
Bug 39081: Fix date and title sorting on batch extend due dates page
Bug 39081: Fix order by due dates
Bug 39081: Adjust the result table
Bug 39081: Allow sort on item type
Bug 39081: (follow-up) Use "data-order" instead of "data-sort"
Bug 39081: Fix date and title sorting on batch extend due dates page
Bug 39081: Fix order by due dates
Bug 39081: Adjust the result table
Bug 39081: Allow sort on item type
Bug 39081: (follow-up) Use "data-order" instead of "data-sort"

Description Owen Leonard 2025-02-10 18:59:24 UTC
Date columns should be configured to sort by unformatted date, and the title column should ignore articles when sorting.
Comment 1 Owen Leonard 2025-02-10 19:12:38 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2025-02-12 16:52:59 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2025-03-10 14:57:18 UTC
Not sure what's happening but it's not working for me, at least for due dates: https://snipboard.io/kZD0qz.jpg
Comment 4 Jonathan Druart 2025-03-10 15:05:21 UTC
ok, I found something.
Comment 5 Jonathan Druart 2025-03-10 15:12:28 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2025-03-10 15:12:30 UTC Comment hidden (obsolete)
Comment 7 Jonathan Druart 2025-03-10 15:12:32 UTC Comment hidden (obsolete)
Comment 8 Jonathan Druart 2025-03-10 15:16:44 UTC
Found bug 39289 when working on this.
Comment 9 Phil Ringnalda 2025-03-21 16:28:46 UTC
Not the end of the world, but it's a little odd to allow sorting by the column with the checkboxes when it doesn't actually sort the way you would hope, by whether or not they are checked.
Comment 10 Magnus Enger 2025-04-01 13:58:28 UTC
Created attachment 180192 [details] [review]
Bug 39081: Fix date and title sorting on batch extend due dates page

This patch updates sorting of the batch extend due dates page so that
dates and titles are sorted correctly.

To test, apply the patch and go to Tools -> Batch extend due dates.

- Submit parameters which will return multiple results
- On the "Confirm selection" page, test the sorting of these columns:
  - Due date
  - Title
  - Checked out on
  - New due date

Sponsored-by: Athens County Public Libraries
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Comment 11 Magnus Enger 2025-04-01 13:58:31 UTC
Created attachment 180193 [details] [review]
Bug 39081: Fix order by due dates

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Comment 12 Magnus Enger 2025-04-01 13:58:35 UTC
Created attachment 180194 [details] [review]
Bug 39081: Adjust the result table

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Comment 13 Magnus Enger 2025-04-01 13:58:39 UTC
Created attachment 180195 [details] [review]
Bug 39081: Allow sort on item type

There is no reason to not allow ordering on item type.

We can now use the same parameters for both tables

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Comment 14 Baptiste Wojtkowski (bwoj) 2025-04-11 14:06:31 UTC
Created attachment 180845 [details] [review]
Bug 39081: Fix date and title sorting on batch extend due dates page

This patch updates sorting of the batch extend due dates page so that
dates and titles are sorted correctly.

To test, apply the patch and go to Tools -> Batch extend due dates.

- Submit parameters which will return multiple results
- On the "Confirm selection" page, test the sorting of these columns:
  - Due date
  - Title
  - Checked out on
  - New due date

Sponsored-by: Athens County Public Libraries
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Comment 15 Baptiste Wojtkowski (bwoj) 2025-04-11 14:06:35 UTC
Created attachment 180846 [details] [review]
Bug 39081: Fix order by due dates

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Comment 16 Baptiste Wojtkowski (bwoj) 2025-04-11 14:06:38 UTC
Created attachment 180847 [details] [review]
Bug 39081: Adjust the result table

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Comment 17 Baptiste Wojtkowski (bwoj) 2025-04-11 14:06:41 UTC
Created attachment 180848 [details] [review]
Bug 39081: Allow sort on item type

There is no reason to not allow ordering on item type.

We can now use the same parameters for both tables

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Comment 18 Katrin Fischer 2025-04-14 06:44:52 UTC
In light of bug 38984 and bug 39015 - is it data-sort or data-order we want for dates?
Comment 19 Owen Leonard 2025-04-15 12:30:28 UTC
Created attachment 180960 [details] [review]
Bug 39081: (follow-up) Use "data-order" instead of "data-sort"

Both attribute names work the same but "data-order" is more frequent in
our templates.
Comment 20 Katrin Fischer 2025-04-15 13:07:51 UTC
Thanks Owen! With all the new datatables work, is there a place we should start documenting or updating documentation?
Comment 21 Katrin Fischer 2025-04-22 06:40:15 UTC
Can you please rebase on latest main? Conflicts probably due to:
Bug 38984 - DataTables's columnDefs cleanup
Comment 22 Owen Leonard 2025-04-22 12:33:34 UTC
Created attachment 181253 [details] [review]
Bug 39081: Fix date and title sorting on batch extend due dates page

This patch updates sorting of the batch extend due dates page so that
dates and titles are sorted correctly.

To test, apply the patch and go to Tools -> Batch extend due dates.

- Submit parameters which will return multiple results
- On the "Confirm selection" page, test the sorting of these columns:
  - Due date
  - Title
  - Checked out on
  - New due date

Sponsored-by: Athens County Public Libraries
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Comment 23 Owen Leonard 2025-04-22 12:33:36 UTC
Created attachment 181254 [details] [review]
Bug 39081: Fix order by due dates

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Comment 24 Owen Leonard 2025-04-22 12:33:38 UTC
Created attachment 181255 [details] [review]
Bug 39081: Adjust the result table

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Comment 25 Owen Leonard 2025-04-22 12:33:41 UTC
Created attachment 181256 [details] [review]
Bug 39081: Allow sort on item type

There is no reason to not allow ordering on item type.

We can now use the same parameters for both tables

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Comment 26 Owen Leonard 2025-04-22 12:33:43 UTC
Created attachment 181257 [details] [review]
Bug 39081: (follow-up) Use "data-order" instead of "data-sort"

Both attribute names work the same but "data-order" is more frequent in
our templates.
Comment 27 Katrin Fischer 2025-04-23 05:20:53 UTC
Thanks for the quick rebase, Owen!
Comment 28 Katrin Fischer 2025-04-23 07:42:55 UTC
Pushed for 25.05!

Well done everyone, thank you!