Bug 29193 - DataTables only showing 20 results on checkout search and patrons search on request.pl
Summary: DataTables only showing 20 results on checkout search and patrons search on r...
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff Client (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Nick Clemens
QA Contact: Testopia
URL:
Keywords:
Depends on: 28055
Blocks:
  Show dependency treegraph
 
Reported: 2021-10-07 19:20 UTC by Nick Clemens
Modified: 2021-10-23 01:36 UTC (History)
5 users (show)

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


Attachments
Bug 29193: Update DataTables option iDisplayLength to pageLength (937 bytes, patch)
2021-10-07 19:34 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 29193: Specify paging as false in circ-patron-search-results.js (1.25 KB, patch)
2021-10-08 13:26 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 29193: Specify paging as false in circ-patron-search-results.js (1.30 KB, patch)
2021-10-08 18:16 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 29193: Specify paging as false in circ-patron-search-results.js (1.35 KB, patch)
2021-10-10 12:50 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2021-10-07 19:20:53 UTC
Both of these pages are set to show -1 results, i.e. all results returned

While this is not great for performance, it is the expected behavior and has broken in 21.05 and master

To recreate:
1 - Checkout 20.11
2 - In checkout search type 'a'
3 - You get all 53 patrons
4 - Checkout master
5 - In checkout search type 'a'
6 - You get 20 patrons
7 - Sort by name
8 - There are more patrons, but you cannot page or find them except by sorting
Comment 1 Nick Clemens 2021-10-07 19:34:30 UTC
Created attachment 125913 [details] [review]
Bug 29193: Update DataTables option iDisplayLength to pageLength
Comment 2 Owen Leonard 2021-10-08 10:31:34 UTC
I think what we want is '"paging": false', unless there was a reason that the iDisplayLength was chosen in the first place. The "paging" option is specifically designed to turn off pagination.
Comment 3 Nick Clemens 2021-10-08 13:26:06 UTC
Created attachment 125961 [details] [review]
Bug 29193: Specify paging as false in circ-patron-search-results.js

This patch removes paging from patron searches using circ-patron-search-results.js

To test:
1 - Browse to a record
2 - Click on the 'Holds' tab
3 - Search for 'a' in patrons
4 - Note you see only 20 results
5 - Sort by name and note that you see different results
6 - Apply patch
7 - Reload page and search
8 - Note you see all results
Comment 4 Jonathan Druart 2021-10-08 14:27:28 UTC
Why don't we provide the full DT controls then?

Shouldn't this patron search use the same methods as other patron searches?
Comment 5 Owen Leonard 2021-10-08 18:16:32 UTC
Created attachment 125984 [details] [review]
Bug 29193: Specify paging as false in circ-patron-search-results.js

This patch removes paging from patron searches using circ-patron-search-results.js

To test:
1 - Browse to a record
2 - Click on the 'Holds' tab
3 - Search for 'a' in patrons
4 - Note you see only 20 results
5 - Sort by name and note that you see different results
6 - Apply patch
7 - Reload page and search
8 - Note you see all results

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 6 Owen Leonard 2021-10-08 18:22:39 UTC
(In reply to Jonathan Druart from comment #4)
> 
> Shouldn't this patron search use the same methods as other patron searches?

Bug 15812 could make this one obsolete.
Comment 7 Katrin Fischer 2021-10-10 12:49:45 UTC
(In reply to Owen Leonard from comment #6)
> (In reply to Jonathan Druart from comment #4)
> > 
> > Shouldn't this patron search use the same methods as other patron searches?
> 
> Bug 15812 could make this one obsolete.

I've just tested bug 15812 and it resolves the issue for checkout search, but not for the holds page, so I think this one is still a good little fix that would also be easily backportable.
Comment 8 Katrin Fischer 2021-10-10 12:50:26 UTC
Created attachment 126021 [details] [review]
Bug 29193: Specify paging as false in circ-patron-search-results.js

This patch removes paging from patron searches using circ-patron-search-results.js

To test:
1 - Browse to a record
2 - Click on the 'Holds' tab
3 - Search for 'a' in patrons
4 - Note you see only 20 results
5 - Sort by name and note that you see different results
6 - Apply patch
7 - Reload page and search
8 - Note you see all results

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 9 Jonathan Druart 2021-10-12 09:19:28 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 10 Kyle M Hall 2021-10-22 13:44:56 UTC
Pushed to 21.05.x for 21.05.05
Comment 11 Fridolin Somers 2021-10-23 01:36:39 UTC
Depends on Bug 28055 not in 20.11.x