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 <kyle@bywatersolutions.com> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This commit is contained in:
parent
a35f970bbe
commit
6fd9b3febe
1 changed files with 12 additions and 14 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue