Bug 34133

Summary: ILL table should be sorted by request id descending by default
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: ILLAssignee: Pedro Amorim <pedro.amorim>
Status: CLOSED FIXED QA Contact:
Severity: minor    
Priority: P5 - low CC: fridolin.somers, lucas, magnus, martin.renvoize, nick, pedro.amorim
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.03,22.11.09
Circulation function:
Attachments: Bug 34133: Set default sort on first column (ID) desc
Lowest numbers at the top
Bug 34133: Set default sort on first column (ID) desc
Bug 34133: Set default sort on first column (ID) desc

Description Nick Clemens (kidclamp) 2023-06-27 14:36:03 UTC
The table saves state, so a user can choose their own. The default should be newest requests first if a user does not set something
Comment 1 Pedro Amorim 2023-06-27 15:00:25 UTC Comment hidden (obsolete)
Comment 2 Magnus Enger 2023-06-29 06:41:41 UTC Comment hidden (obsolete)
Comment 3 Magnus Enger 2023-06-29 06:42:16 UTC Comment hidden (obsolete)
Comment 4 Martin Renvoize (ashimema) 2023-06-29 07:26:13 UTC
Should this actually be sorting on the placed on date as a posed to ID?
Comment 5 Pedro Amorim 2023-06-29 08:40:26 UTC
Test plan:

Before applying patch:
* Open incognito at /cgi-bin/koha/ill/ill-requests.pl, 
* Verify order is by ASC (lowest ID first)
* Close incognito

Apply patch, then:
* Open incognito at /cgi-bin/koha/ill/ill-requests.pl,
* Verify order is by DESC (highest ID first)

Did the test plan myself on both Google Chrome and Firefox.
Can you please give it another go, Magnus?
Comment 6 Magnus Enger 2023-06-30 07:34:40 UTC
Created attachment 152886 [details] [review]
Bug 34133: Set default sort on first column (ID) desc

Test plan:

Before applying patch:
* Open incognito at /cgi-bin/koha/ill/ill-requests.pl,
* Verify order is by ASC (lowest ID first)
* Close incognito

Apply patch, then:
* Open incognito at /cgi-bin/koha/ill/ill-requests.pl,
* Verify order is by DESC (highest ID first)

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Followed the test plan from Bugzilla, and added it above.
Works as advertised.
Comment 7 Magnus Enger 2023-06-30 07:36:33 UTC
(In reply to Martin Renvoize from comment #4)
> Should this actually be sorting on the placed on date as a posed to ID?

Would that make a difference in practice?
Comment 8 Pedro Amorim 2023-07-17 08:11:50 UTC
Hey guys any chance for a PQA here? Something that needs improving? Thanks!
Comment 9 Nick Clemens (kidclamp) 2023-07-17 12:52:06 UTC
Created attachment 153541 [details] [review]
Bug 34133: Set default sort on first column (ID) desc

Test plan:

Before applying patch:
* Open incognito at /cgi-bin/koha/ill/ill-requests.pl,
* Verify order is by ASC (lowest ID first)
* Close incognito

Apply patch, then:
* Open incognito at /cgi-bin/koha/ill/ill-requests.pl,
* Verify order is by DESC (highest ID first)

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Followed the test plan from Bugzilla, and added it above.
Works as advertised.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 10 Tomás Cohen Arazi (tcohen) 2023-07-19 15:08:44 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 11 Fridolin Somers 2023-08-04 01:36:43 UTC
Pushed to 23.05.x for 23.05.03
Comment 12 Pedro Amorim 2023-08-18 10:53:41 UTC
Nice work everyone!

Pushed to 22.11.x for next release