Bug 11256 - Set a number of items to display on a biblio detail page
Summary: Set a number of items to display on a biblio detail page
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 23024
  Show dependency treegraph
 
Reported: 2013-11-15 11:11 UTC by Jonathan Druart
Modified: 2019-08-18 07:41 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 11256: Opac: Set a number of items to display on a biblio detail page. (8.34 KB, patch)
2013-11-15 11:12 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 11256: Opac: Set a number of items to display on a biblio detail page. (8.32 KB, patch)
2014-02-18 09:10 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 11256: Opac: Set a number of items to display on a biblio detail page - bootstrap (2.58 KB, patch)
2014-02-18 13:28 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 11256: Opac: Set a number of items to display on a biblio detail page. (8.37 KB, patch)
2014-02-18 21:56 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 11256: Opac: Set a number of items to display on a biblio detail page - bootstrap (2.63 KB, patch)
2014-02-18 21:56 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 11256: Opac: Set a number of items to display on a biblio detail page. (8.39 KB, patch)
2014-02-21 13:53 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11256: Opac: Set a number of items to display on a biblio detail page - bootstrap (2.68 KB, patch)
2014-02-21 13:53 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2013-11-15 11:11:15 UTC
Currently, the number of items to display is hardcoded (50). But the perl script loads all items before to check if the number of items is oversized.
It would be great to have a syspref for this number and not to load all items in the perl script.
Comment 1 Jonathan Druart 2013-11-15 11:12:50 UTC Comment hidden (obsolete)
Comment 2 Mathieu Saby 2013-11-15 11:45:46 UTC
Good idea.
Loading all the items was probably one of the cause of a performance issue we suffered from last year in serials display.

Mathieu
Comment 3 Marc Véron 2014-02-17 17:38:33 UTC
Wanted to test, Patch does not apply.
Comment 4 Jonathan Druart 2014-02-18 09:10:53 UTC Comment hidden (obsolete)
Comment 5 Marc Véron 2014-02-18 13:08:54 UTC
Testing

Record with 6 physical items

With prog theme
---------------

OpacMaxItemsToDisplay > 6  OK (Displays all)

OpacMaxItemsToDisplay 6  OK (Displays all)

OpacMaxItemsToDisplay < 6  OK (Displays "Many-Message" + Link, Link displays all)

OpacMaxItemsToDisplay 0  OK (Displays "Many-Message" + Link, Link displays all)

OpacMaxItemsToDisplay (Empty) (Displays "Many-Message" + Link, Link displays all)


With ccsr theme
-------------------------
Same as with prog theme


With bootstrap theme
--------------------

OpacMaxItemsToDisplay > 6  OK (Displays all)

OpacMaxItemsToDisplay 6  OK (Displays all)

OpacMaxItemsToDisplay < 6  Wrong ( No physical items for this record )

OpacMaxItemsToDisplay 0  Wrong ( No physical items for this record )

OpacMaxItemsToDisplay (Empty) Wrong ( No physical items for this record )


I had first bootstrap theme active. It took me a while to find out why I got "No physical items..."
Comment 6 Jonathan Druart 2014-02-18 13:14:32 UTC
Hello Marc,
The patch does not include changes for the bootstrap theme. I am going to provide a follow-up.
Comment 7 Jonathan Druart 2014-02-18 13:28:39 UTC Comment hidden (obsolete)
Comment 8 Chris Cormack 2014-02-18 21:56:17 UTC Comment hidden (obsolete)
Comment 9 Chris Cormack 2014-02-18 21:56:35 UTC Comment hidden (obsolete)
Comment 10 Kyle M Hall 2014-02-21 13:53:25 UTC
Created attachment 25534 [details] [review]
Bug 11256: Opac: Set a number of items to display on a biblio detail page.

Currently, the number of items to display is hardcoded (50).
But the perl script loads all items before to check if the number of
items is oversized.

This patch adds a new pref OpacMaxItemsToDisplay (default to 50). If the
*total* number of items for a biblio is greater, no item is displayed
and a link allows to display all items.

Test plan:
1/ search a biblio with many items
2/ set the pref according the number of items you want to display
3/ verify the items are not displayed if the number of items is greater
the pref value
4/ enable the OpacSeparateHoldings pref and verify the items are
displayed in different tabs (if items have different locations).

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 11 Kyle M Hall 2014-02-21 13:53:30 UTC
Created attachment 25535 [details] [review]
Bug 11256: Opac: Set a number of items to display on a biblio detail page - bootstrap

This patch adds the changes for the bootstrap theme.
See test plan in the previous patch.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 12 Galen Charlton 2014-02-21 18:45:08 UTC
Pushed to master.  Thanks, Jonathan!