Summary: | In result page items with negative notforloan are available | ||
---|---|---|---|
Product: | Koha | Reporter: | Fridolin Somers <fridolin.somers> |
Component: | Staff interface | Assignee: | Fridolin Somers <fridolin.somers> |
Status: | CLOSED FIXED | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | normal | ||
Priority: | P5 - low | CC: | chris, gmcharlt, jcamins, m.de.rooy |
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: | ||
Circulation function: | |||
Attachments: |
Proposed patch
[SIGNED-OFF] Bug 8996: In result page items with negative notforloan are available |
Description
Fridolin Somers
2012-10-31 15:41:50 UTC
On intranet result page, items with notforloan < 0 are available. But this negative value is used when item is on order. It should be unavailable. Created attachment 13145 [details] [review] Proposed patch Small patch. Test with an item with notforloan < 0. Without patch, it is available. With patch, it is unavailable and notforloan description is displayed. Created attachment 13147 [details] [review] [SIGNED-OFF] Bug 8996: In result page items with negative notforloan are available Signed-off-by: Owen Leonard <oleonard@myacpl.org> --- Before --- 4 items, 2 available: Athens [YA Taylor] (2) Circulating 2 unavailable: Athens [YA Taylor] Download (1) Circulating The Plains [YA Taylor] Staff Collection (1) Circulating --- After --- 4 items, 1 available: Athens [YA Taylor] (1) Circulating 3 unavailable: Athens [YA Taylor] Ordered (1) Circulating Athens [YA Taylor] Download (1) Circulating The Plains [YA Taylor] Staff Collection (1) Circulating QA Comment: I would agree with your second adjustment on line 1840 (removing the >0 condition, including negative notforloan). I am not sure about your first adjustment on line 1802 (changing ==-1 to <0 ). As I understand, a negative notforloan value does not immediately imply that the item is on order. Historically, the value of -1 means on order, although someone could change or remove the authvalue. (In that case he would be hindered by the hardcoded -1 tests in code..) But where do we say that -2 means on order too? Please clarify or correct me where my conclusion seems wrong. Changing status to reflect need of clarification. > But where do we say that -2 means on order too?
I would say yes, I found several places in actual code indicating that all negative notforloan values mean "On order" :
XSLT.pm line 247 :
if ( $item->{notforloan} < 0) {
$status = "On order";
}
Reserves.pm line 820 :
# if item is not for loan it cannot be reserved either.....
# execpt where items.notforloan < 0 : This indicates the item is holdable.
return ( '' ) if ( $notforloan_per_item > 0 ) or $notforloan_per_itemtype;
opac-details.pl line 523 :
$norequests = 0
if ( (not $itm->{'wthdrawn'} )
&& (not $itm->{'itemlost'} )
&& ($itm->{'itemnotforloan'}<0 || not $itm->{'itemnotforloan'} )
&& (not $itemtypes->{$itm->{'itype'}}->{notforloan} )
&& ($itm->{'itemnumber'} ) );
The Koha configurations I sow use several negative values to indicate the several levels of acquisition.
Feel free to ask more.
(In reply to comment #5) > I would say yes, I found several places in actual code indicating that all > negative notforloan values mean "On order" : Well, enough to convince me. Will send a mail to Nicole asking if this is already documented somewhere too. Status to Passed QA. This patch has been pushed to master. Pushed to 3.8.x, will be in 3.8.7 |