Bug 28605 - Code to calculate item's holdability must be moved to Koha::Item
Summary: Code to calculate item's holdability must be moved to Koha::Item
Status: RESOLVED DUPLICATE of bug 3142
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 28422
Blocks:
  Show dependency treegraph
 
Reported: 2021-06-21 09:58 UTC by Jonathan Druart
Modified: 2021-06-22 13:37 UTC (History)
0 users

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***