Bug 10741: reformat test for displaying place hold link in OPAC search results
To test:
[1] Turn on the syspref for enabling OPAC holds.
[2] Create an item and bring it up on the OPAC search
results. Run through the following possibilities,
by changing the item, and verify that the place hold
link in OPAC search results appears only when the item is
- not lost AND
- not withdrawn AND
- not damaged (or is damged and AllowHoldsOnDamagedItems is ON) AND
- the item is not marked not-for-loan OR
the item has a negative notforloan value (e.g., it is on order)
Note that it is necessary to reindex the test bib after making
each change to the test item.
[3] Also verify that whether or not in the item is in transit does
NOT affect whether the place hold link appears.
[4] Verify that there is no regression on bug 8975 (i.e., if an
item is on order, that status should be displayed in staff client
search results).
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 397ba93f97)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
parent
e143ff3072
commit
65e0bbb263
28
C4/Search.pm
28
C4/Search.pm
|
|
@ -1939,23 +1939,17 @@ sub searchResults {
|
|||
$item_onhold_count++ if $reservestatus eq 'Waiting';
|
||||
$item->{status} = $item->{wthdrawn} . "-" . $item->{itemlost} . "-" . $item->{damaged} . "-" . $item->{notforloan};
|
||||
|
||||
# can place hold on item ?
|
||||
if ( !$item->{itemlost} ) {
|
||||
if ( !$item->{wthdrawn} ){
|
||||
if ( $item->{damaged} ){
|
||||
if ( C4::Context->preference('AllowHoldsOnDamagedItems') ){
|
||||
# can place a hold on a damaged item if AllowHoldsOnDamagedItems is true
|
||||
if ( ( !$item->{notforloan} || $item->{notforloan} < 0 ) ){
|
||||
# item is either for loan or has notforloan < 0
|
||||
$can_place_holds = 1;
|
||||
}
|
||||
}
|
||||
} elsif ( !$item->{notforloan} || $item->{notforloan} < 0 ) {
|
||||
# item is not damaged and item is either for loan or has notforloan < 0
|
||||
$can_place_holds = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
# can place a hold on a item if
|
||||
# not lost nor withdrawn
|
||||
# not damaged unless AllowHoldsOnDamagedItems is true
|
||||
# item is either for loan or on order (notforloan < 0)
|
||||
$can_place_holds = 1
|
||||
if (
|
||||
!$item->{itemlost}
|
||||
&& !$item->{wthdrawn}
|
||||
&& ( !$item->{damaged} || C4::Context->preference('AllowHoldsOnDamagedItems') )
|
||||
&& ( !$item->{notforloan} || $item->{notforloan} < 0 )
|
||||
);
|
||||
|
||||
$other_count++;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue