Bug 4231

Summary: Placing holds from cart fails silently
Product: Koha Reporter: Liz Rea <wizzyrea>
Component: Hold requestsAssignee: Galen Charlton <gmcharlt>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: minor    
Priority: P5 - low CC: kyle, smoreland, tomascohen, veron
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 4231 - Placing holds from cart fails silently
[SIGNED-OFF] Bug 4231 - Placing holds from cart fails silently
[PASSED QA] Bug 4231 - Placing holds from cart fails silently

Description Chris Cormack 2010-05-21 01:24:42 UTC


---- Reported by wizzyrea@gmail.com 2010-02-19 20:01:42 ----

When placing holds from the cart items that are not holdable cause the process to fail silently.

Example:

Patron puts items in cart, A, B, C, D

A is available
B is available
C is not holdable
D has no items

Until C and D are removed from the cart, one cannot place holds on A and B from the cart, it fails silently: clicking the Place Hold button doesn't do anything and gives no meaningful output.

Easiest solution for this is to add a message to the error message for "Some items cannot be placed on hold" to say "Remove the offending items from your cart."

Best solution is to re-do the script to not fail on those items that are not holdable, and put the items that are holdable on hold.

(incorrectly configured circ rules also cause issues here, but that is not really part of the bug)



---- Additional Comments From gmcharlt@gmail.com 2010-02-22 01:54:17 ----

I wasn't able to reproduce this in the current HEAD.  When I set up a cart with four bibs, two of which had holdable items, one of which had no items, and the last of which had a lost item, when I selected all four bibs from the cart and clicked the place hold button, it displays a list of the titles.  The two that have items available to request can be selected, while the other two have disabled checkboxes and a note indicating that no items are available to request.  When I submitted the hold requests, the two holds that could be placed were placed - I didn't see a silent failure.

Please attach screenshots.  If possible, could I also have access to your test system's OPAC?



---- Additional Comments From wizzyrea@gmail.com 2010-02-22 14:09:26 ----

our test opac is at koha.nekls.org.

I'm wondering now if this is related to some incorrect circulation rules, will check all of that again, and ask my folks to step by step document this (if it's actually a problem or if the rules were funny).



---- Additional Comments From wizzyrea@gmail.com 2010-02-22 14:16:47 ----

Actually, I think I left off something crucial: this was in the intranet, not the OPAC.

>.< my apologies on that.



---- Additional Comments From smoreland@nekls.org 2010-02-22 15:32:02 ----

A screencast of a silent fail when the cart includes a bib with no items attached.

http://screencast.com/t/ZWQyNGY2NGQ



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

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

Actual time not defined. Setting to 0.0
Setting qa contact to the default for this product.
   This bug either had no qa contact or an invalid one.

Comment 1 Owen Leonard 2011-05-18 16:31:10 UTC
> A screencast of a silent fail when the cart includes a bib with no items
> attached.
> 
> http://screencast.com/t/ZWQyNGY2NGQ

This is the behavior I observe in current master.
Comment 2 Marc Véron 2014-08-09 19:33:19 UTC Comment hidden (obsolete)
Comment 3 Owen Leonard 2014-08-11 14:34:57 UTC
The patch is an improvement but why block the entire operation just because some records have no items? The place hold screen is capable of functioning even if one or more titles have no items. As far as I can tell they are simply skipped.

Can we pass an accurate message to the place hold screen while still allowing holds on the titles with items?
Comment 4 Marc Véron 2014-08-11 15:05:58 UTC
The aim of this patch is just to add a better explanation for the current behaviour, because the existing explanation makes no sense with multiple hold requests.

It is a small improvement for the users until somebody finds time to improve the whole functionallity.
Comment 5 Owen Leonard 2014-08-11 15:32:45 UTC Comment hidden (obsolete)
Comment 6 Katrin Fischer 2014-08-15 12:04:30 UTC
I am sorry, but I have problems reproducing the behaviour. I tried addings holds from the cart with several combinations of records. I am always taken to the opac holds screen with multiple entries for my records. Those with no items show 'no items available' and the others show the items and normal hold options.
I didn't succeed in triggering the message.
Comment 7 Marc Véron 2014-08-15 12:46:37 UTC
I did a quick test on 3.17.00.013, Staff client

Do a search that results in biblos without items.
Select some of them (Checkbox at the left of the list)
Add the selection to cart
Open Cart
Select all of the biblios
Click on Link 'Place hold'

Result copy-pasted from screen :-)
Cannot place hold: this record has no items attached.
Comment 8 Katrin Fischer 2014-08-15 13:11:26 UTC
I can't spot a difference to how I did it - I think we need another set of eyes here. For me it worked nicely with and without the patches, the messages never showing up.
Comment 9 Kyle M Hall (khall) 2014-08-15 17:16:46 UTC
(In reply to Katrin Fischer from comment #6)
> I am sorry, but I have problems reproducing the behaviour. I tried addings
> holds from the cart with several combinations of records. I am always taken
> to the opac holds screen with multiple entries for my records. Those with no
> items show 'no items available' and the others show the items and normal
> hold options.
> I didn't succeed in triggering the message.

I think this is because the issue is prog specific, and not bootstrap. Not sure if this should be fixed in master or just 3.16 and earlier.
Comment 10 Kyle M Hall (khall) 2014-08-15 17:17:19 UTC
Created attachment 30856 [details] [review]
[PASSED QA] Bug 4231 - Placing holds from cart fails silently

This patch adds a more meaningfull message if multiple biblios with no
items attached are in the cart.

To test:
- Add biblios with and without items to cart
- Go to cart, select all and click 'Place hold'

Without patch, message reads:
Cannot place hold: this record has no items attached.

With patch, message reads:
Cannot place hold: one or more records without items attached.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 11 Tomás Cohen Arazi (tcohen) 2014-08-15 18:45:10 UTC
Patch pushed to master.

Thanks Marc!