https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21572

Magnus Enger <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #35 from Magnus Enger <[email protected]> ---
Thanks for the new patches, I will test them and see if I can sign off. 

But I also wanted to raise a question if there is some more basic flaw in the
logic here:

Say you have a record with 5 items and one record level hold (on the shelf
hold). If you try to check out any item connected with this record in SCO you
are denied, with this message: 

  Sorry, this item cannot be checked out at this station.
  This item is on hold for another patron. Please see a member of the library
staff.

This happens even if there are four items left on the shelf, that can be used
to fulfill the one hold on the record. And it says "This item is on hold", even
if there is no item level hold, just a record level hold. 

Looking at the code, it looks like there is a shift from "check if there are
any holds on this particular item" to "check if there are any holds on the
record it belongs to". I wonder if this is meant to happen or if it is a bug. 

Do any libraries actually want this functionality? 

opac/sco/sco-main.pl calls C4::Circulation::CanBookBeIssued like this:

        ( $impossible, $needconfirm ) = CanBookBeIssued(
            $patron,
            $barcode,
            undef,
            0,
            C4::Context->preference("AllowItemsOnHoldCheckoutSCO")
        );

https://git.koha-community.org/Koha-community/Koha/src/branch/main/opac/sco/sco-main.pl#L196

CanBookBeIssued says (note the singular "item" in the comment):

        # See if the item is on reserve.
        my ( $restype, $res ) = C4::Reserves::CheckReserves($item_object);

https://git.koha-community.org/Koha-community/Koha/src/branch/main/C4/Circulation.pm#L1216

The POD for C4::Reserves::CheckReserves says: 

  As I understand it, C<&CheckReserves> looks for the given item in the
  reserves. If it is found, that's a match, and C<$status> is set to
  C<Waiting>.

  Otherwise, it finds the most important item in the reserves with the
  same biblio number as this book (I'm not clear on this) and returns it
  with C<$status> set to C<Reserved>.

https://git.koha-community.org/Koha-community/Koha/src/branch/main/C4/Reserves.pm#L833

I suspect there is a problem in the shift that happens here, from looking for
reserves connected directly to the item, to looking for any reserves connected
to the record. 

Not sure if this is directly relevant to the patches on this bug, or if it
should be a sperate bug.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to