Bug 13088

Summary: Allow the user to specify a max amount of facets to show.
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: SearchingAssignee: Tomás Cohen Arazi <tomascohen>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: jdemuth, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: Sponsored Patch complexity: Medium patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 11232    
Bug Blocks:    
Attachments: Bug 13088: Add a syspref so the user can chose the amount of facets to show
Bug 13088: Allow the user to specify a max amount of facets to show
[SIGNED-OFF] Bug 13088: Add a syspref so the user can chose the amount of facets to show
[SIGNED-OFF] Bug 13088: Allow the user to specify a max amount of facets to show
[PASSED QA] Bug 13088: Add a syspref so the user can chose the amount of facets to show
[PASSED QA] Bug 13088: Allow the user to specify a max amount of facets to show
Bug 13088: (RM followup) add missing pref mock

Description Tomás Cohen Arazi 2014-10-15 16:09:18 UTC

    
Comment 1 Tomás Cohen Arazi 2014-10-21 14:07:06 UTC Comment hidden (obsolete)
Comment 2 Tomás Cohen Arazi 2014-10-21 14:07:11 UTC Comment hidden (obsolete)
Comment 3 Owen Leonard 2014-10-24 13:52:54 UTC Comment hidden (obsolete)
Comment 4 Owen Leonard 2014-10-24 13:53:31 UTC Comment hidden (obsolete)
Comment 5 Katrin Fischer 2014-10-25 18:54:07 UTC
Created attachment 32738 [details] [review]
[PASSED QA] Bug 13088: Add a syspref so the user can chose the amount of facets to show

This patch introduces a syspref (FacetMaxCount) that controls how many
facets to show for each category (e.g. Author).

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Katrin Fischer 2014-10-25 18:54:22 UTC
Created attachment 32739 [details] [review]
[PASSED QA] Bug 13088: Allow the user to specify a max amount of facets to show

This patch makes _get_facet_from_result_set rely on a new syspref (FacetsMaxCount)
to set the max facets to show for each facet category. It defaults to 20 if
the syspref is absent or empty.

To test:
- Have a search with lots of facet results (with some category showing the "See more" link).
- Jump to "See more", notice it shows more than 20 facet values.
- Apply the patch, reload the page.
=> SUCCESS It only shows 20 (default hardcoded value)
- Change the FacetsMaxCount syspref to other value (e.g. 15 or 100).
- Reload
=> SUCCESS: it shows the expected amount.
- Sign off :-D

Regards

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Test plan completed successfully

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Passes tests and QA script, works as described.
Comment 7 Tomás Cohen Arazi 2014-10-27 15:31:08 UTC
Patch pushed to master.
Comment 8 Tomás Cohen Arazi 2014-10-28 15:09:01 UTC
Created attachment 32844 [details] [review]
Bug 13088: (RM followup) add missing pref mock

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>