@@ -, +, @@ 1 - Set OPACShowHoldQueueDetails system preference to 'Show holds and their priorty level' 2 - Place a few holds on a bib on the staff side 3 - Mark 1 waiting 4 - Attempt to place hold on the bib on the opac 5 - Note 'Your priority' and 'Number of holds' are the same number 6 - Place another hold, confirm both increase 7 - Set another hold waiting, confirm both decrease 8 - Apply patch 9 - Confirm 'Your priority' is now 1 greater than Number of holds --- opac/opac-reserve.pl | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) --- a/opac/opac-reserve.pl +++ a/opac/opac-reserve.pl @@ -170,18 +170,9 @@ foreach my $biblioNumber (@biblionumbers) { # Compute the priority rank. $biblioData->{object} = $biblio; - my $holds = $biblio->holds; - my $rank = $holds->count; - $biblioData->{reservecount} = 1; # new reserve - while ( my $hold = $holds->next ) { - if ( $hold->is_waiting ) { - $rank--; - } - else { - $biblioData->{reservecount}++; - } - } - $biblioData->{rank} = $rank + 1; + my $reservecount = $biblio->holds->search({ found => [ {"!=" => "W"},undef] })->count; + $biblioData->{reservecount} = $reservecount; + $biblioData->{rank} = $reservecount + 1; } # --