Bugzilla – Attachment 127134 Details for
Bug 29283
Cannot delete basket with cancelled order for deleted biblio
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29283: Don't attempt to cancel cancelled orders
Bug-29283-Dont-attempt-to-cancel-cancelled-orders.patch (text/plain), 1.64 KB, created by
Joonas Kylmälä
on 2021-10-31 12:26:09 UTC
(
hide
)
Description:
Bug 29283: Don't attempt to cancel cancelled orders
Filename:
MIME Type:
Creator:
Joonas Kylmälä
Created:
2021-10-31 12:26:09 UTC
Size:
1.64 KB
patch
obsolete
>From 41636c33aaa4a38a144dd241907890de04d927f1 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 20 Oct 2021 13:06:06 +0000 >Subject: [PATCH] Bug 29283: Don't attempt to cancel cancelled orders >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >When deleting a basket we cancel all the contained orders - when a >basket contains an order that was previously cancelled this can cause >an error if the biblio was deleted > >When picking the orders to cancel, we should limit our search >to those not already cancelled. > >To test: >- have a basket with at least one order >- click "Cancel order and delete catalog record", confirm cancellation of order and deletion of bib >- click "Delete basket", confirm deletion >- get error "Cannot insert order: Mandatory parameter biblionumber is missing at /kohadevbox/koha/acqui/basket.pl line 136. > at /usr/share/perl/5.28/Carp.pm line 289" >- apply patch >- restart >- delete the basket >- success! > >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> > >Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> >--- > acqui/basket.pl | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/acqui/basket.pl b/acqui/basket.pl >index ac09913920..3694348a5a 100755 >--- a/acqui/basket.pl >+++ b/acqui/basket.pl >@@ -127,7 +127,9 @@ if ( $op eq 'delete_confirm' ) { > my $delbiblio = $query->param('delbiblio'); > my $basket_obj = Koha::Acquisition::Baskets->find($basketno); > >- my $orders = $basket_obj->orders; >+ my $orders = $basket_obj->orders->search({ >+ datecancellationprinted => undef >+ }); > > my @cannotdelbiblios; > >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 29283
:
126585
|
126589
| 127134 |
127135