Bug 36030 - Do not show "Place hold" for deleted biblio record on basket page
Summary: Do not show "Place hold" for deleted biblio record on basket page
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-08 08:12 UTC by Marcel de Rooy
Modified: 2024-02-12 07:42 UTC (History)
1 user (show)

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


Attachments
Bug 36030: acqui/basket: Do not place hold on deleted biblio (1.67 KB, patch)
2024-02-08 10:44 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2024-02-08 08:12:25 UTC Comment hidden (obsolete)
Comment 1 Marcel de Rooy 2024-02-08 08:31:50 UTC
Similarly:

How to reproduce this, not clear now. But I have quite a bunch of orders that have no biblionumber, no deleted biblionumber, orderstatus ordered and a filled datecancellationprinted.

The system only allows you to edit the delivery date.
Comment 2 Katrin Fischer 2024-02-08 08:56:40 UTC
Hi Marcel,

this is a duplicate I think - there are multiple issues with deleted records and acquisition orders. I'd love to work together on solving these.

The way to create a problem goes like this:

* Order something, receive it, etc.
* Delete the bibliographic record from the catalog.

Until bug 33262 that created entries in aqorders with no biblionumber left. Now we keep the connection with a new column deleted_biblionumber, but we are not making use of it yet.

For other bugs see:

* Bug 10869 - Can't cancel order line if title deleted
* Bug 10758 - Show bibliographic information of deleted records in acquisitions
* Bug 27893 - Delete of biblio with order does not always warn

I believe we cannot tell people to not delete records, because items bought might also be removed from the library at one point, but we still need to allow the library to keep track of these for accounting/auditing purposes on how money was spent.
Comment 3 Marcel de Rooy 2024-02-08 09:08:53 UTC
I thought that I saw an orderline with date cancellation too in the first table. But I cant reproduce.. Code seems to be fine.
Comment 4 Marcel de Rooy 2024-02-08 10:14:39 UTC
Another observation: Open basket, order with deleted biblio. Can place a hold on that record!? The link contains no biblionumber..
Comment 5 Marcel de Rooy 2024-02-08 10:15:17 UTC
(In reply to Marcel de Rooy from comment #4)
> Another observation: Open basket, order with deleted biblio. Can place a
> hold on that record!? The link contains no biblionumber..

https://master.rijkskoha.nl:28443/cgi-bin/koha/reserve/request.pl?biblionumber=

Fun
Comment 6 Katrin Fischer 2024-02-08 10:36:16 UTC
(In reply to Marcel de Rooy from comment #3)
> I thought that I saw an orderline with date cancellation too in the first
> table. But I cant reproduce.. Code seems to be fine.

We have seen this with orders in any state. I think it's always possible to overwrite the warning and delete the bibliopgrahic record somehow. Maybe also need to think of batch record deletion/batch item deletion with 'delete record' checkbox set.

(In reply to Marcel de Rooy from comment #5)
> (In reply to Marcel de Rooy from comment #4)
> > Another observation: Open basket, order with deleted biblio. Can place a
> > hold on that record!? The link contains no biblionumber..
> 
> https://master.rijkskoha.nl:28443/cgi-bin/koha/reserve/request.
> pl?biblionumber=
> 
> Fun

I'd say this is a separate bug to report, but overall we need better handling for the "deleted record" case. 

Did you see the earlier comment and bugs?
Comment 7 Marcel de Rooy 2024-02-08 10:44:28 UTC
Created attachment 161884 [details] [review]
Bug 36030: acqui/basket: Do not place hold on deleted biblio

Trivial fix.

Test plan:
Find a deleted biblio record in ACQ (in active orders part) and
verify that there is no Place hold option on that row.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 8 Marcel de Rooy 2024-02-08 10:44:45 UTC
(In reply to Marcel de Rooy from comment #4)
> Another observation: Open basket, order with deleted biblio. Can place a
> hold on that record!? The link contains no biblionumber..

Added a fix for this now along the way.
Comment 9 Marcel de Rooy 2024-02-08 10:46:07 UTC
(In reply to Katrin Fischer from comment #6)
> Did you see the earlier comment and bugs?

Yes, thanks! Added few comments on the 10869. Awaiting comments there.
Comment 10 Marcel de Rooy 2024-02-12 07:41:09 UTC
Okay. I am changing title here. The original 36030 is a duplicate. Continue that discussion on 10869. I am moving this one to "Do not show Place hold for deleted biblio".
Comment 11 Marcel de Rooy 2024-02-12 07:41:40 UTC
This is a very trivial patch. Self SO.