Bug 6385 - All items should optionally be displayed by default in the OPAC
Summary: All items should optionally be displayed by default in the OPAC
Status: BLOCKED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Olli-Antti Kivilahti
QA Contact:
URL:
Keywords:
Depends on: 11129
Blocks: 11157
  Show dependency treegraph
 
Reported: 2011-05-22 17:38 UTC by Jared Camins-Esakov
Modified: 2014-03-13 16:18 UTC (History)
3 users (show)

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


Attachments
Bug 6385 - All items should optionally be displayed by default in the OPAC (8.98 KB, patch)
2013-10-28 14:04 UTC, Olli-Antti Kivilahti
Details | Diff | Splinter Review
Bug 6385 - All items should optionally be displayed by default in the OPAC (10.39 KB, patch)
2013-10-28 14:21 UTC, Olli-Antti Kivilahti
Details | Diff | Splinter Review
Bug 6385 - All items should optionally be displayed by default in the OPAC (12.53 KB, patch)
2013-10-29 08:59 UTC, Olli-Antti Kivilahti
Details | Diff | Splinter Review
Bug 6385 - All items should optionally be displayed by default in the OPAC (12.53 KB, patch)
2013-10-29 10:21 UTC, Olli-Antti Kivilahti
Details | Diff | Splinter Review
Bug 6385 - All items should optionally be displayed by default in the OPAC (13.17 KB, patch)
2013-10-30 09:34 UTC, Olli-Antti Kivilahti
Details | Diff | Splinter Review
Bug 6385 - All items should optionally be displayed by default in the OPAC (94.05 KB, patch)
2013-11-26 17:17 UTC, Olli-Antti Kivilahti
Details | Diff | Splinter Review
Bug 6385 - All items should optionally be displayed by default in the OPAC (94.04 KB, patch)
2013-11-28 12:01 UTC, Olli-Antti Kivilahti
Details | Diff | Splinter Review
Bug 6385 - All items should optionally be displayed by default in the OPAC (13.24 KB, patch)
2013-11-28 12:12 UTC, Olli-Antti Kivilahti
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jared Camins-Esakov 2011-05-22 17:38:12 UTC
There should be an option to display all items (holdings) in the table on the OPAC, for those libraries who regularly have more than 50 items, and want the patron to see all of them immediately. Since most libraries will probably not to show all items, this will need to be optional.
Comment 1 Owen Leonard 2012-03-06 16:01:28 UTC
In opac-detail.pl:

# If there is a lot of items, and the user has not decided
# to view them all yet, we first warn him
# TODO: The limit of 50 could be a syspref
my $viewallitems = $query->param('viewallitems');
if ($dat->{'count'} >= 50 && !$viewallitems) {
    $template->param('lotsofitems' => 1);
}

Sounds like a solution might be to add a system preference "OPACmaxItemsOnDetail" which takes a number. Enter "50" to see up to fifty items, after which would appear a link to show all. Enter "0" to show all by default.
Comment 2 Olli-Antti Kivilahti 2013-10-28 13:38:31 UTC
My solution:

After a record has more than "OPACmaxItemsOnDetail" Items, display only the items in the users branch, or if that fails, Items arrived in the past 1 year.

Present the filter from bug 11129 to the user when too many items available.
Comment 3 Olli-Antti Kivilahti 2013-10-28 14:04:59 UTC Comment hidden (obsolete)
Comment 4 Olli-Antti Kivilahti 2013-10-28 14:21:05 UTC Comment hidden (obsolete)
Comment 5 Olli-Antti Kivilahti 2013-10-29 08:59:45 UTC Comment hidden (obsolete)
Comment 6 Olli-Antti Kivilahti 2013-10-29 10:21:38 UTC Comment hidden (obsolete)
Comment 7 Olli-Antti Kivilahti 2013-10-30 09:34:12 UTC Comment hidden (obsolete)
Comment 8 Olli-Antti Kivilahti 2013-10-30 09:40:51 UTC
Sponsored by the Joensuu Regional Library
Comment 9 Olli-Antti Kivilahti 2013-11-26 17:17:05 UTC Comment hidden (obsolete)
Comment 10 Olli-Antti Kivilahti 2013-11-28 12:01:32 UTC Comment hidden (obsolete)
Comment 11 Olli-Antti Kivilahti 2013-11-28 12:12:36 UTC
Created attachment 23208 [details] [review]
Bug 6385 - All items should optionally be displayed by default in the OPAC

Added a system preference "OPACmaxItemsOnDetail" to set a threshold after which only results from the
users branch are displayed, or Items from the past year if homebranch cannot be defined.

This tightly couples with bug 11129 which provides the filtering mechanism to display smaller result sets.
Also added lots of complexity to define the warning messages based on is the filter used to override the
"OPACmaxItemsOnDetail".

Added a new "limit"-filter to C4::Items::GetItemsInfo() which adds the LIMIT-clause to the big SQL.
Added a unit test for the filter to the Items.t

Fixed a use-case where a user has no items in his branch, and the limited items set is emtpy.
Now using items from past year if none available in the users branch.
Comment 12 Mark Tompsett 2014-02-28 16:20:40 UTC
How does this compare with bug 11256 which has already been pushed to master?
Comment 13 Owen Leonard 2014-03-12 19:29:40 UTC
Can't be tested because Bug 11129 doesn't apply.
Comment 14 Magnus Enger 2014-03-13 16:18:32 UTC
(In reply to Owen Leonard from comment #13)
> Can't be tested because Bug 11129 doesn't apply.

Setting status to BLOCKED based on this comment.