Bug 13088 - Allow the user to specify a max amount of facets to show.
Summary: Allow the user to specify a max amount of facets to show.
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on: 11232
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-15 16:09 UTC by Tomás Cohen Arazi
Modified: 2015-12-03 22:11 UTC (History)
2 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Medium patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 13088: Add a syspref so the user can chose the amount of facets to show (3.49 KB, patch)
2014-10-21 14:07 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 13088: Allow the user to specify a max amount of facets to show (1.71 KB, patch)
2014-10-21 14:07 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 13088: Add a syspref so the user can chose the amount of facets to show (3.57 KB, patch)
2014-10-24 13:52 UTC, Owen Leonard
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 13088: Allow the user to specify a max amount of facets to show (1.84 KB, patch)
2014-10-24 13:53 UTC, Owen Leonard
Details | Diff | Splinter Review
[PASSED QA] Bug 13088: Add a syspref so the user can chose the amount of facets to show (3.60 KB, patch)
2014-10-25 18:54 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 13088: Allow the user to specify a max amount of facets to show (1.90 KB, patch)
2014-10-25 18:54 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 13088: (RM followup) add missing pref mock (842 bytes, patch)
2014-10-28 15:09 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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>