Bug 3142 - standardize how OPAC and staff determine requestability
Summary: standardize how OPAC and staff determine requestability
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Target Milestone: ---
Assignee: Galen Charlton
QA Contact: Bugs List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-19 01:21 UTC by Galen Charlton
Modified: 2015-12-20 15:34 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Cormack 2010-05-21 01:06:58 UTC


---- Reported by gmcharlt@gmail.com 2009-04-19 13:21:12 ----

The OPAC and bib details and MARC display have varying code to determine whether an item should be displayed as available to place a hold request.  These should be consolidated into a function:

catalogue/detail.pl:

$norequests = 0 unless ( ( $item->{'notforloan'} > 0 ) || ( $item->{'itemnotforloan'} > 0 ) );

catalogue/detailprint.pl:

$norequests = 0 unless $itm->{'notforloan'};

catalogue/MARCdetail.pl:

$norequests = 0 if $subf[$i][1] ==0 and $tagslib->{ $field->tag() }->{ $subf[$i][0] }->{kohafield} eq 'items.notforloan'
    ;

NOTE: There is another problem here - this is grabbing item data directly from the MARC record when it should be using GetItems().

opac/opac-detail.pl:

126      $norequests = 0
127        if ( (not $itm->{'wthdrawn'} )
128          && (not $itm->{'itemlost'} )
129          && ($itm->{'itemnotforloan'}<0 || not $itm->{'itemnotforloan'} )
130          && (not $itemtypes->{$itm->{'itype'}}->{notforloan} )
131          && ($itm->{'itemnumber'} ) );

opac/opac-detailprint.pl:

$norequests = 0 unless $itm->{'notforloan'};

Note that there can be legitimate differences between how the requestability is calculated between OPAC and staff.



--- Bug imported by chris@bigballofwax.co.nz 2010-05-21 01:06 UTC  ---

This bug was previously known as _bug_ 3142 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=3142

Actual time not defined. Setting to 0.0
CC member adrea@moablibrary.org does not have an account here

Comment 1 delaye 2012-02-09 16:38:02 UTC
I have three branch: A, B and C
Each branch uses a different rule for reservations:
A: all branch
B: no hold
C: branch attachment 

I have a bib record that has three copies:
1 copy under A
1 copy under B
A copy in C


The three copies are borrowed.

At the OPAC the borrowerss can hold the items

A borrower located in B wishes to reserve the document. It activates the "hold the items"

Since the interface  professional koha knows how to interpret the prohibitions and so I can hold only copy A

At the OPAC the borrower can hold the three copies -> bug
Comment 2 Marc Véron 2015-12-20 15:34:54 UTC
Still valid?