Bug 28605

Summary: Code to calculate item's holdability must be moved to Koha::Item
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Bugs List <koha-bugs>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 28422    
Bug Blocks:    

Description Jonathan Druart 2021-06-21 09:58:17 UTC
Code is duplicated in opac/opac-ISBDdetail.pl, opac/opac-MARCdetail.pl and opac/opac-detail.pl (at least).

It must be moved to a Koha::Item method

 721     $norequests = 0
 722       if $norequests
 723         && !$itm->{'withdrawn'}
 724         && !$itm->{'itemlost'}
 725         && ($itm->{'itemnotforloan'}<0 || not $itm->{'itemnotforloan'})
 726         && !$itemtypes->{$itm->{'itype'}}->{notforloan}
 727         && $itm->{'itemnumber'};

search for '$norequests' in those 3 files.
Comment 1 Jonathan Druart 2021-06-22 13:37:30 UTC

*** This bug has been marked as a duplicate of bug 3142 ***