[Koha-bugs] [Bug 13116] Make it possible to propagate errors from C4::Reserves::CanItemBeReserved() to the web-templates.

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Oct 21 14:32:35 CEST 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13116

Olli-Antti Kivilahti <olli-antti.kivilahti at jns.fi> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #32551|0                           |1
        is obsolete|                            |

--- Comment #6 from Olli-Antti Kivilahti <olli-antti.kivilahti at jns.fi> ---
Created attachment 32552
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=32552&action=edit
Bug 13116 - Make it possible to propagate errors from
C4::Reserves::CanItemBeReserved() to the web-templates.

This patch changes the way CanBookBeReserved() and CanItemBeReserved() return
error
messages and how they are dealt with in the templates. This change makes it
possible
to distinguish between different types of reservation failure.

Currently only two types of errors are handled, all the way to the user, from
the CanItemBeReserved():
-ageRestricted
-tooManyReserves which translates to maxreserves

 #############
 - TEST PLAN -
 #############
((-- AGE RESTRICTION --))
STAFF CLIENT
1. Find a Record with Items, update the MARC Subfield 521a to "PEGI 16".
2. Get a Borrower who is younger than 16 years.
3. Place a hold for the underage Borrower for the ageRestricted Record.
4. You get a notification, that placing a hold on ageRestricted material is
   forbidden. (previously you just got a notification about maximum amount of
reserves reached)

OPAC
A. In OPAC go to opac-detail.pl for the ageRestricted Biblio.
   The "Place Hold" -button is missing on the right sidebar if the underage
   user is logged in.
B. From the opac-search.pl a hold can still be placed, but it will fail giving
   an error about age restrictions.

((-- MAXIMUM RESERVES REACHED --))
0. Set the  maxreserves -syspref to 3 (or any low value)
STAFF CLIENT AND OPAC
1. Make a ton of reserves for one borrower.
2. Observe the notification about maximum reserves reached blocking your
reservations.

Updated the unit tests to match the new method return values.
t/db_dependent/Holds.t & Reserves.t

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list