Bug 14797 - Cancelling orders with no alert to existing holds
Summary: Cancelling orders with no alert to existing holds
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P1 - high enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
: 30342 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-09-09 15:40 UTC by Fiona Borthwick
Modified: 2023-07-08 17:08 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fiona Borthwick 2015-09-09 15:40:27 UTC
When AcqCreateItem is set to create an item when placing an order, this allows holds to be placed on on-order items.  When an order is then cancelled, there is no alert to existing holds.

When the order is cancelled, there is still a link to the hold against the bib record but the Holds screen in the bib record states that you cannot place holds as no item exists.  As a result, you cannot cancel the hold from this screen nor can library staff see the patron details to inform them.

As a workaround, they can add a new temporary item to allow them to delete the hold but it would be good to have an alert appearing on screen at the point of cancelling the order (via the Delete Order link in the Basket) so that the link to the hold record could be broken first.

Workflow to reproduce:

- Set AcqCreateItem to 'placing an order'.
- From the Acquisitions screen, select a vendor, create a new basket and add an order to this basket.
- As the system preference is set to add the item, fill out all the relevant - item information as well as other acq info.
- Once saved, create a hold for a patron
- Confirm that hold is present and can be seen from the bib record
- From the open basket (so reopen if already closed), select the 'Delete Order' link against the correct orderline.
- Enter cancellation reason and click Yes.

Order is then cancelled but there was no alert about the hold.
Comment 1 Owen Leonard 2016-06-21 11:53:10 UTC
Here's what I found in master:

- After the hold is placed, the view of items in the basket shows that I can't cancel the hold and delete the record, but doesn't show a reason. I think it should warn me about the holds.

- The cancel order link is active, and lets me cancel the order without warning me of any holds.

- After canceling the order the hold remains on the record, but I am not prevented from canceling the hold from the holds screen.

The current status of this bug isn't as serious as it sounds like it is in 3.18.x, but the issue of warning about existing holds still exists.
Comment 2 Sandre Cunha 2016-08-06 20:53:59 UTC
Not only do we need to be alerted to the hold, but we need to be able to cancel the hold from the same screen or from a link on that screen, and give the patron a reason for cancelling (e.g., the publisher has cancelled the product, the publication date has been extended to next year, the item is out of print or no longer available, etc.)
Comment 3 Ray Delahunty 2016-08-15 10:14:31 UTC
This remains a problem in 3.20 (we move to 16.05 soon). As a workaround we have set up a report to be run whenever an order is cancelled, to look for reservations. We have added this to the homepage, and our cataloging / acquisitions staff can easily access it.  

SELECT o.ordernumber, b.title, b.author, p.surname, p.firstname, r.reservedate, 
       r.cancellationdate, r.branchcode
FROM reserves r 
LEFT JOIN borrowers p USING (borrowernumber)
LEFT JOIN biblio b USING (biblionumber) 
LEFT JOIN aqorders o USING (biblionumber)
LEFT JOIN aqbasket n using (basketno)
WHERE o.ordernumber=<<Order number>>

Better than nothing I suppose.

Ray Delahunty
University of the Arts London
Comment 4 Sandre Cunha 2016-08-22 18:50:12 UTC
(In reply to Ray Delahunty from comment #3)
> This remains a problem in 3.20 (we move to 16.05 soon). As a workaround we
> have set up a report to be run whenever an order is cancelled, to look for
> reservations. We have added this to the homepage, and our cataloging /
> acquisitions staff can easily access it.  
> 
> SELECT o.ordernumber, b.title, b.author, p.surname, p.firstname,
> r.reservedate, 
>        r.cancellationdate, r.branchcode
> FROM reserves r 
> LEFT JOIN borrowers p USING (borrowernumber)
> LEFT JOIN biblio b USING (biblionumber) 
> LEFT JOIN aqorders o USING (biblionumber)
> LEFT JOIN aqbasket n using (basketno)
> WHERE o.ordernumber=<<Order number>>
> 
> Better than nothing I suppose.
> 
> Ray Delahunty
> University of the Arts London

And then how are the patrons notified?
Comment 5 Lucy Vaux-Harvey 2022-03-04 11:57:30 UTC
This remains an issue for orders with current holds attached to them.  It would be great if the 'Cancel order' options in the basket view made it clear that the item/biblio would not be deleted due to a hold.

Also the error message that displays following the Cancel order confirmation screen is not clear.  The error message is this one (found on another bug report) - https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117968.  Could this be re-worded and formatted more clearly to highlight that the items have not been deleted because a hold is attached?
Comment 6 CB 2022-04-20 20:18:20 UTC
My current practice is to cancel the order and delete the Bib record when cancelling an item on order.  If we have another copy of the same item on the existing Bib record, koha will not let you delete the Bib record; it will only allow you to cancel the order for the item.  This should be fine as far as a hold is concerned, as the hold will now still be in place for the item currently in circulation.

As such, koha will not allow you to cancel the order and delete the Bib record if there is a hold on the item (and this is the only item attached to the Bib record).  This automatically alerts me that there is a hold on the item.

I do not find this "bug" to be an issue in my workflow or with koha.
Comment 7 CB 2022-12-22 23:33:58 UTC
Whenever there is a hold on an item, when we reopen the basket and attempt to cancel the order under the "Cancel Order" section, the only option will be to "Cancel Order" if there is a hold on an item (the notification shows "Can't cancel order and delete catalog record" as well.) This is an obvious indication that a hold exists on the item.   If there is not a hold on the item, you will be given the options to either "Cancel Order" or "Cancel order and delete catalog record."
Comment 8 Caroline Cyr La Rose 2023-07-05 19:38:07 UTC
I don't know if this is the same bug as the one I just ran into. I was looking to recreate the context for this string

"Can't cancel order, (%s) holds are linked with this order. Cancel holds first"

(I was wondering if (%s) was a number or not)

However, if my ordered item has a hold, it says 

Cancel order
Can't cancel order and delete catalog record

And if I hover over the "Can't cancel order and delete catalog record" there is a tooltip indicating that the record cannot be deleted for reasons listed below. But there are no reasons.
Comment 9 Katrin Fischer 2023-07-08 17:08:40 UTC
*** Bug 30342 has been marked as a duplicate of this bug. ***