Bug 9823: QA follow-up for GetReservesFromBiblionumber calls
The template params holds and holdcount are not used in the ISBD template. Removed the associated code from catalogue/ISBDdetail.pl. Same applies for catalogue/MARCdetail.pl and labeledMARCdetail.pl. Same applies also for catalogue/imageviewer.pl. Same applies also for catalogue/moredetail.pl. In catalogue detail.tt only the number of holds is used. Removed the code that passed the holds array to the template. For consistency opac-detail should also incorporate future holds into its holds count; added the all_dates parameter for that reason. The Reserves module is no longer needed in moredetail. Removed it. Checked the other scripts also. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
parent
8b685c1e80
commit
e536fd087d
|
|
@ -113,9 +113,6 @@ $template->param (
|
|||
);
|
||||
|
||||
|
||||
my $holds = C4::Reserves::GetReservesFromBiblionumber({ biblionumber => $biblionumber, all_dates => 1 });
|
||||
my $holdcount = scalar( @$holds );
|
||||
$template->param( holdcount => $holdcount, holds => $holds );
|
||||
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
||||
|
||||
|
|
|
|||
|
|
@ -336,8 +336,5 @@ $template->param (
|
|||
searchid => $query->param('searchid'),
|
||||
);
|
||||
|
||||
my $holds = C4::Reserves::GetReservesFromBiblionumber({ biblionumber => $biblionumber, all_dates => 1 });
|
||||
my $holdcount = scalar( @$holds );
|
||||
$template->param( holdcount => $holdcount, holds => $holds );
|
||||
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
||||
|
|
|
|||
|
|
@ -414,9 +414,10 @@ if (C4::Context->preference('TagsEnabled') and $tag_quantity = C4::Context->pref
|
|||
'sort'=>'-weight', limit=>$tag_quantity}));
|
||||
}
|
||||
|
||||
#we only need to pass the number of holds to the template
|
||||
my $holds = C4::Reserves::GetReservesFromBiblionumber({ biblionumber => $biblionumber, all_dates => 1 });
|
||||
my $holdcount = scalar ( @$holds );
|
||||
$template->param( holdcount => $holdcount, holds => $holds );
|
||||
$template->param( holdcount => scalar ( @$holds ) );
|
||||
|
||||
my $StaffDetailItemSelection = C4::Context->preference('StaffDetailItemSelection');
|
||||
if ($StaffDetailItemSelection) {
|
||||
# Only enable item selection if user can execute at least one action
|
||||
|
|
|
|||
|
|
@ -78,8 +78,5 @@ $template->{VARS}->{'norequests'} = $norequests;
|
|||
$template->param(C4::Search::enabled_staff_search_views);
|
||||
$template->{VARS}->{'biblio'} = $biblio;
|
||||
|
||||
my $holds = C4::Reserves::GetReservesFromBiblionumber({ biblionumber => $biblionumber, all_dates => 1 });
|
||||
my $holdcount = scalar( @$holds );
|
||||
$template->param( holdcount => $holdcount, holds => $holds );
|
||||
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
||||
|
|
|
|||
|
|
@ -137,8 +137,5 @@ $template->param (
|
|||
searchid => $query->param('searchid'),
|
||||
);
|
||||
|
||||
my $holds= C4::Reserves::GetReservesFromBiblionumber({ biblionumber => $biblionumber, all_dates => 1 });
|
||||
my $holdcount = scalar( @$holds );
|
||||
$template->param( holdcount => $holdcount, holds => $holds );
|
||||
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ use C4::Circulation; # to use itemissues
|
|||
use C4::Members; # to use GetMember
|
||||
use C4::Search; # enabled_staff_search_views
|
||||
use C4::Members qw/GetHideLostItemsPreference/;
|
||||
use C4::Reserves qw(GetReservesFromBiblionumber);
|
||||
use Koha::DateUtils;
|
||||
|
||||
my $query=new CGI;
|
||||
|
|
@ -217,9 +216,6 @@ $template->param(ONLY_ONE => 1) if ( $itemnumber && $showncount != @items );
|
|||
$template->{'VARS'}->{'searchid'} = $query->param('searchid');
|
||||
|
||||
|
||||
my $holds = GetReservesFromBiblionumber({ biblionumber => $biblionumber, all_dates => 1 });
|
||||
my $holdcount = scalar( @$holds );
|
||||
$template->param( holdcount => $holdcount, holds => $holds );
|
||||
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
||||
|
||||
|
|
|
|||
|
|
@ -539,7 +539,7 @@ for ( C4::Context->preference("OPACShowHoldQueueDetails") ) {
|
|||
}
|
||||
my $has_hold;
|
||||
if ( $show_holds_count || $show_priority) {
|
||||
my $reserves = GetReservesFromBiblionumber({ biblionumber => $biblionumber });
|
||||
my $reserves = GetReservesFromBiblionumber({ biblionumber => $biblionumber, all_dates => 1 });
|
||||
$template->param( holds_count => scalar( @$reserves ) ) if $show_holds_count;
|
||||
foreach (@$reserves) {
|
||||
$item_reserves{ $_->{itemnumber} }++ if $_->{itemnumber};
|
||||
|
|
|
|||
Loading…
Reference in New Issue