Bugzilla – Attachment 98178 Details for
Bug 24389
Claiming an order can display an invalid successful message
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24389: Better error handle when claiming late orders
Bug-24389-Better-error-handle-when-claiming-late-o.patch (text/plain), 1.85 KB, created by
Martin Renvoize (ashimema)
on 2020-01-30 16:16:22 UTC
(
hide
)
Description:
Bug 24389: Better error handle when claiming late orders
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-01-30 16:16:22 UTC
Size:
1.85 KB
patch
obsolete
>From 38b4986c279e117a4b026f5a456f2c66ffe45490 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 16 Dec 2019 17:15:19 +0100 >Subject: [PATCH] Bug 24389: Better error handle when claiming late orders > >A successful message says that the email has been sent and the order has >been claimed, but nothing happened. > >Test plan: >0. Do not apply this patch >1. Create a new vendor, does not create a contact >2. Create some orders, close the basket >3. Go to the late orders page and claims some orders >=> You get a successful message, but the claim has not been done! >4. Apply this patch >5. Claim the orders >=> You get an error >6. Set a contact for the vendor >7. Claim the orders >=> Success > >In the docker container, you may need to: >% apt install postfix >% postfix start >Edit /etc/hosts >127.0.0.1 localhost localhost.localdomain > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > acqui/lateorders.pl | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/acqui/lateorders.pl b/acqui/lateorders.pl >index e2e0ee21db..5dc9ea6e33 100755 >--- a/acqui/lateorders.pl >+++ b/acqui/lateorders.pl >@@ -112,12 +112,12 @@ if ($op and $op eq "send_alert"){ > } > }; > >- if ( $@ ) { >- $template->param(error_claim => $@); >- } elsif ( ref $err and exists $err->{error} and $err->{error} eq "no_email" ) { >+ if ( ref $err and exists $err->{error} and $err->{error} eq "no_email" ) { > $template->{VARS}->{'error_claim'} = "no_email"; > } elsif ( ref $err and exists $err->{error} and $err->{error} eq "no_order_selected"){ > $template->{VARS}->{'error_claim'} = "no_order_selected"; >+ } elsif ( $@ or ref $err and exists $err->{error} ) { >+ $template->param(error_claim => $@ || $err->{error}); > } else { > $template->{VARS}->{'info_claim'} = 1; > } >-- >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 24389
:
97126
|
98178
|
99081