Koha/koha-tmpl/intranet-tmpl/prog/en
Olli-Antti Kivilahti 51f0a0b722 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)

((-- 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.

((-- MULTIPLE HOLDS STAFF CLIENT --))
3. Observe the error notification "Cannot place hold on some items"

((-- MULTIPLE HOLDS OPAC --))
1. Make a search with many results, of which atleast one is age restricted to the current borrower.
2. Select few results and "Place hold" from to result summary header element.
       (Not individual results "Place hold")
3. Observe individual Biblios getting the "age restricted"-notification, where others can be
   reserved just fine.

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

Followed test plan. Works as expected and displays meaningful messages for the reason why placing a hold is not possible.

Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-11-12 11:23:41 -03:00
..
css Bug 8836 [Alt QA Followup] - Add confirmation dialog for deleting collections 2014-11-06 15:12:20 -03:00
data Bug 11695 - Fixed typo in marc21_field_008.xml 2014-03-11 14:21:23 +00:00
includes Bug 7673: The delete all items link should only be displayed if delete_all_items is set 2014-11-11 12:27:12 -03:00
js Bug 12987: Update table footer with the visible rows 2014-11-11 09:46:21 -03:00
lib/yui Bug 13139 - Move treeview jQuery plugin outside of language-specific directory 2014-10-27 12:36:53 -03:00
modules Bug 13116 - Make it possible to propagate errors from C4::Reserves::CanItemBeReserved() to the web-templates. 2014-11-12 11:23:41 -03:00
xslt Bug 13225: Z39.50 result Card View doesn't work for UNIMARC 2014-11-10 11:59:48 -03:00
columns.def Bug 11673: columns.def has swapped last and first name of alt contact 2014-08-07 16:17:21 -03:00