When trying to receive orders after entering the invoice id this error is displayed: Can't call method "active_orders" on an undefined value at /home/vagrant/kohaclone/acqui/parcel.pl line 244
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