From: Colin Campbell Date: Fri, 20 Jul 2012 09:45:16 +0000 (+0100) Subject: Bug 8479 Calculate rank irrespective of display option X-Git-Url: http://git.rot13.org/?p=koha.git;a=commitdiff_plain;h=6fd9b3febeebf95bd0590269bd33739f5cbed7de Bug 8479 Calculate rank irrespective of display option Calculation of rank was being skipped based on display option but it is used in calculating the rank passed to AddReserve resulting in reserves being created with null priorities causing them to be skipped in subsequent processing Signed-off-by: Kyle M Hall Signed-off-by: Paul Poulain --- diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl index 1fb4df08de..2bbb4be2f6 100755 --- a/opac/opac-reserve.pl +++ b/opac/opac-reserve.pl @@ -147,22 +147,20 @@ foreach my $biblioNumber (@biblionumbers) { $itemInfoHash{$itemInfo->{itemnumber}} = $itemInfo; } - if ($show_holds_count) { - # Compute the priority rank. - my ( $rank, $reserves ) = GetReservesFromBiblionumber($biblioNumber,1); - $biblioData->{reservecount} = 1; # new reserve - foreach my $res (@$reserves) { - my $found = $res->{'found'}; - if ( $found && ($found eq 'W') ) { - $rank--; - } - else { - $biblioData->{reservecount}++; - } + # Compute the priority rank. + my ( $rank, $reserves ) = + GetReservesFromBiblionumber( $biblioNumber, 1 ); + $biblioData->{reservecount} = 1; # new reserve + foreach my $res (@{$reserves}) { + my $found = $res->{found}; + if ( $found && $found eq 'W' ) { + $rank--; + } + else { + $biblioData->{reservecount}++; } - $rank++; - $biblioData->{rank} = $rank; } + $biblioData->{rank} = $rank + 1; } #