Bug 5834: Holds link missing when 942$c is not for loan
Adds a check for item-level_itypes system preference. Note that this only
applies to the search results screens.
To test:
1) Set item-level_itypes to 'specific item'
2) Create record and set 942$c to an itype that is marked not for loan
3) Create item with itype not marked 'not for loan'
Current behaviour: Holds link is not shown, sys pref setting doesn't matter
After patch: Holds link is shown
- when item-level_itype is 'specific item'
- when item-level_itype is 'biblio record' and 942$c itype is for loan
Holds link is not shown
- when item-level_itype is 'biblio record' and 942$c is not for loan
Signed-off-by: Jared Camins-Esakov <jcamins@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit e1654e1aa1)
Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
This commit is contained in:
parent
b97494fdee
commit
2124dc88ef
|
|
@ -1694,9 +1694,12 @@ sub searchResults {
|
|||
|
||||
}
|
||||
|
||||
# last check for norequest : if itemtype is notforloan, it can't be reserved either, whatever the items
|
||||
$can_place_holds = 0
|
||||
if $itemtypes{ $oldbiblio->{itemtype} }->{notforloan};
|
||||
# if biblio level itypes are used and itemtype is notforloan, it can't be reserved either
|
||||
if (!C4::Context->preference("item-level_itypes")) {
|
||||
if ($itemtypes{ $oldbiblio->{itemtype} }->{notforloan}) {
|
||||
$can_place_holds = 0;
|
||||
}
|
||||
}
|
||||
$oldbiblio->{norequests} = 1 unless $can_place_holds;
|
||||
$oldbiblio->{itemsplural} = 1 if $items_count > 1;
|
||||
$oldbiblio->{items_count} = $items_count;
|
||||
|
|
|
|||
Loading…
Reference in New Issue