Koha/koha-tmpl/intranet-tmpl/prog/en/modules/basket
Kyle M Hall 430f0ea6ba Bug 7940 - Placing a hold on a single item from the staff cart causes errors
This is caused by the javascript function placeHold() in basket.pl
The cause of this error is thus: when a staff member uses the cart
to place holds on multiple items at once, the cart redirects to
reserver/request.pl with the params 'biblionumbers' ( a string of
biblionumbers separated by slashes ( e.g. '5/4/3/' ) and the param
multi_hold with a value of 1.

When multi_hold is enabled, request.pl splits the string 'biblionumbers'
on those slashes and works on that list.

In placeHold(), when only one item is checked, the system passes
the param biblionumbers with a single biblionumber ( e.g. '5/' )
and does *not* pass the multi_hold param. This causes request.pl
to not parse the biblionumbers param, and thus reserve.pl has
no biblionumber to work on ( hence our error here ).

There are two options to resolve this:
A) Add the multi_hold param even for a single hold from the cart.
B) In the event of a single hold being placed from the cart,
   switch to the standard single hold url ( i.e. request.pl?biblionumber=234 )

This commit resolves the situation using option B, as it seems more
logical than using the multi-holds system for a single hold.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
passes tests, works as advertised. Good catch!

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-04-12 17:58:49 +02:00
..
basket.tt Bug 7940 - Placing a hold on a single item from the staff cart causes errors 2012-04-12 17:58:49 +02:00
downloadcart.tt Bug 2780 - Capitalize strings consistently (Staff client cart) 2012-04-10 10:03:24 +02:00
sendbasket.tt Bug 2780 - Capitalize strings consistently (Staff client cart) 2012-04-10 10:03:24 +02:00
sendbasketform.tt Bug 2780 - Follow up - Capitalize strings consistently (Staff client cart) 2012-04-10 10:04:08 +02:00