Summary: | Error on receiving orders when there is an order with a deleted record | ||
---|---|---|---|
Product: | Koha | Reporter: | Katrin Fischer <katrin.fischer> |
Component: | Acquisitions | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Severity: | major | ||
Priority: | P5 - low | CC: | 1joynelson, jonathan.druart, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
20.05.00
|
|
Circulation function: | |||
Bug Depends on: | 24430 | ||
Bug Blocks: | |||
Attachments: |
Bug 24672: (bug 24430 follow-up) Do not get active orders on deleted biblio record
Bug 24672: (bug 24430 follow-up) Do not get active orders on deleted biblio record |
Description
Katrin Fischer
2020-02-14 23:05:02 UTC
Not sure if it's related, but I have a basket with 2 unreceived deleted records (it's not good, but can happen) It appears to be related - reopening the closed basket (taking the orders out of the list of orders to receive that way) makes the error go away. Caused by commit f31993d126ed97fdc80605931f41ed29b1dac5d1 Bug 24430: Remove CountBiblioInOrders and its traces Created attachment 99090 [details] [review] Bug 24672: (bug 24430 follow-up) Do not get active orders on deleted biblio record On bug 24430 we replaced the call to CountBiblioInOrders with Koha::Biblio->active_orders In case the bibliographic record is deleted, the count must be set to 0. This prevent the app to crash with: Can't call method "active_orders" on an undefined value at /home/vagrant/kohaclone/acqui/parcel.pl line 244 Test plan: Create 2+ orders Receive one, delete it, delete the bibliographic record Receive the order one => Without this patch, on the parcel page you should get the error => With this patch applied you must be allowed to finish the receive Created attachment 101502 [details] [review] Bug 24672: (bug 24430 follow-up) Do not get active orders on deleted biblio record On bug 24430 we replaced the call to CountBiblioInOrders with Koha::Biblio->active_orders In case the bibliographic record is deleted, the count must be set to 0. This prevent the app to crash with: Can't call method "active_orders" on an undefined value at /home/vagrant/kohaclone/acqui/parcel.pl line 244 Test plan: Create 2+ orders Receive one, delete it, delete the bibliographic record Receive the order one => Without this patch, on the parcel page you should get the error => With this patch applied you must be allowed to finish the receive Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> I was about to submit the same patch and found you filed it, Katrin. Thanks for the patch Jonathan. Nice work everyone! Pushed to master for 20.05 not backported to 19.11.x due to dependencies |