Bug 13419

Summary: Add filters and server-side processing to the shelves list view
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: ListsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: alex.arnaud, m.de.rooy, tomascohen, veron
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 13421    
Attachments: Bug 13419: Add server-side processing for lists
Bug 13419: Add filters on the list table
Bug 13419: Add tests
[Signed-off] Bug 13421: Add the creation time for virtual shelves
[Signed-off] Bug 13419: Add server-side processing for lists
[Signed-off] Bug 13419: Add filters on the list table
Bug 13419: (follow-up) Add tests - remove existing shelves
[Signed-off] Bug 13419: Add tests
[Signed-off] Bug 13419: (follow-up) Add tests - remove existing shelves
[PASSED QA] Bug 13419: Add server-side processing for lists
[PASSED QA] Bug 13419: Add filters on the list table
[PASSED QA] Bug 13419: Add tests
[PASSED QA] Bug 13419: (follow-up) Add tests - remove existing shelves
Bug 13419: Add server-side processing for lists
Bug 13419: Add filters on the list table
Bug 13419: Add tests
Bug 13419: (follow-up) Add tests - remove existing shelves
Bug 13419: Add server-side processing for lists
Bug 13419: Add filters on the list table
Bug 13419: Add tests
Bug 13419: (follow-up) Add tests - remove existing shelves
Bug 13419: (follow-up) fix call to set_userenv
Bug 13419: (QA followup) remove useless warnings

Description Jonathan Druart 2014-12-09 16:09:19 UTC
This will be a new enhancement: Search and filter the lists on the intranet side.
The OPAC won't be affected by this patch set.
Comment 1 Jonathan Druart 2014-12-09 16:15:42 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2014-12-09 16:15:46 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2014-12-09 16:15:51 UTC Comment hidden (obsolete)
Comment 4 Marc Véron 2014-12-18 04:42:08 UTC
The filter behaves as follows:

Edit / change  'List name'
Result: List is filtered: OK

Edit /change 'Author':
Result: List is filtered: OK

Change selection in drop box 'Sort by'
Result: No change in list. You have to change 'List name' or 'Author' to trigger filtering. - This is confusing.
Comment 5 Marc Véron 2014-12-18 05:09:45 UTC Comment hidden (obsolete)
Comment 6 Marc Véron 2014-12-18 05:11:16 UTC
Comment on attachment 34504 [details] [review]
[Signed-off] Bug 13421: Add the creation time for virtual shelves

Sorry, attached to wrong bug
Comment 7 Jonathan Druart 2014-12-18 10:22:22 UTC
(In reply to Marc Véron from comment #4)
> Change selection in drop box 'Sort by'
> Result: No change in list. You have to change 'List name' or 'Author' to
> trigger filtering. - This is confusing.

Looks good here. Did you see the "processing" message?
Comment 8 Marc Véron 2014-12-18 13:44:38 UTC Comment hidden (obsolete)
Comment 9 Marc Véron 2014-12-18 13:46:25 UTC Comment hidden (obsolete)
Comment 10 Marc Véron 2014-12-18 14:01:50 UTC
For patch #3 "Add tests" I get errors

#   Failed test 'There should be 12 public shelves in total'
#   at t/db_dependent/Utils/Datatables_Virtualshelves.t line 199.
#          got: '15'
#     expected: '12'

#   Failed test 'There should be 12 private shelves'
#   at t/db_dependent/Utils/Datatables_Virtualshelves.t line 202.
#          got: '15'
#     expected: '12'

#   Failed test 'There should be 12 public shelves in total'
#   at t/db_dependent/Utils/Datatables_Virtualshelves.t line 214.
#          got: '15'
#     expected: '12'

#   Failed test 'There should be 12 public shelves in total'
#   at t/db_dependent/Utils/Datatables_Virtualshelves.t line 230.
#          got: '15'
#     expected: '12'
# Looks like you failed 4 tests of 13.


However if I remove all public lists, it passes OK
Comment 11 Jonathan Druart 2014-12-18 14:41:22 UTC Comment hidden (obsolete)
Comment 12 Jonathan Druart 2014-12-18 14:42:01 UTC
(In reply to Marc Véron from comment #10)
> For patch #3 "Add tests" I get errors

Good catch Marc, thanks for testing!
Comment 13 Marc Véron 2014-12-18 14:57:38 UTC Comment hidden (obsolete)
Comment 14 Marc Véron 2014-12-18 15:00:27 UTC Comment hidden (obsolete)
Comment 15 Kyle M Hall 2014-12-19 16:26:23 UTC Comment hidden (obsolete)
Comment 16 Kyle M Hall 2014-12-19 16:27:00 UTC Comment hidden (obsolete)
Comment 17 Kyle M Hall 2014-12-19 16:27:03 UTC Comment hidden (obsolete)
Comment 18 Kyle M Hall 2014-12-19 16:27:05 UTC Comment hidden (obsolete)
Comment 19 Jonathan Druart 2015-04-20 14:26:59 UTC Comment hidden (obsolete)
Comment 20 Jonathan Druart 2015-04-20 14:27:04 UTC Comment hidden (obsolete)
Comment 21 Jonathan Druart 2015-04-20 14:27:08 UTC Comment hidden (obsolete)
Comment 22 Jonathan Druart 2015-04-20 14:27:14 UTC Comment hidden (obsolete)
Comment 23 Jonathan Druart 2015-04-20 14:28:00 UTC
Patches rebased.
Comment 24 Jonathan Druart 2015-04-20 14:34:38 UTC
Created attachment 38193 [details] [review]
Bug 13419: Add server-side processing for lists

This patch adds DataTables using a server-side processing to display
lists (virtual shelves).

Test plan:
1/ Go on virtualshelves/shelves.p
2/ Play with the table functions (sort, filter, pagination, etc.)
3/ Go with the Public lists tab and verify the table is correctly
filtered.

Tested together with patch #2, works as expected.
Signed-off-by: Marc Veron <veron@veron.ch>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 25 Jonathan Druart 2015-04-20 14:34:41 UTC
Created attachment 38194 [details] [review]
Bug 13419: Add filters on the list table

Tested together with patch #1, works as expected
Signed-off-by: Marc Veron <veron@veron.ch>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 26 Jonathan Druart 2015-04-20 14:34:45 UTC
Created attachment 38195 [details] [review]
Bug 13419: Add tests

Test plan:
    prove t/db_dependent/Utils/Datatables_Virtualshelves.t
should return green

Tested together with follow-up, works as expected
Signed-off-by: Marc Veron <veron@veron.ch>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 27 Jonathan Druart 2015-04-20 14:34:48 UTC
Created attachment 38196 [details] [review]
Bug 13419: (follow-up) Add tests - remove existing shelves

Works as expected.
Signed-off-by: Marc Veron <veron@veron.ch>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 28 Jonathan Druart 2015-04-22 15:29:19 UTC
Created attachment 38347 [details] [review]
Bug 13419: (follow-up) fix call to set_userenv
Comment 29 Tomás Cohen Arazi 2015-04-22 18:11:33 UTC
Created attachment 38355 [details] [review]
Bug 13419: (QA followup) remove useless warnings

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Comment 30 Tomás Cohen Arazi 2015-04-22 18:27:42 UTC
Patches pushed to master.

Thanks Jonathan!