Bugzilla – Attachment 33602 Details for
Bug 12505
Make variable aqorders.listprice in acq claim notice work and improve error handling
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 12505 - Acq claim: Show error message when no order is selected
PASSED-QA-Bug-12505---Acq-claim-Show-error-message.patch (text/plain), 2.67 KB, created by
Katrin Fischer
on 2014-11-16 10:30:42 UTC
(
hide
)
Description:
[PASSED QA] Bug 12505 - Acq claim: Show error message when no order is selected
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-11-16 10:30:42 UTC
Size:
2.67 KB
patch
obsolete
>From 9d8c251c4a913754173e27f6f6c8616e10727910 Mon Sep 17 00:00:00 2001 >From: simith <simith@inlibro.com> >Date: Thu, 13 Nov 2014 13:25:38 -0500 >Subject: [PATCH] [PASSED QA] Bug 12505 - Acq claim: Show error message when no > order is selected > >If no order is selected on the acq claim page when clicking >'Claim order' an ugly perl error message is displayed. > >This patch corrects the behaviour to display a human readable >'No order selected' >instead. > >Signed-off-by: Paola Rossi <paola.rossi@cineca.it> >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Reworded commit message to reflect what the patch achieves. >Works as described and passes tests. >--- > C4/Letters.pm | 6 ++++++ > acqui/lateorders.pl | 2 ++ > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt | 2 ++ > 3 files changed, 10 insertions(+) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index 8c9f507..5673cbc 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -324,6 +324,12 @@ sub SendAlerts { > LEFT JOIN aqbooksellers ON subscription.aqbooksellerid=aqbooksellers.id > WHERE serial.serialid IN ( > }; >+ >+ if (!@$externalid){ >+ carp "No Order seleted"; >+ return { error => "no_order_seleted" }; >+ } >+ > $strsth .= join( ",", @$externalid ) . ")"; > my $sthorders = $dbh->prepare($strsth); > $sthorders->execute; >diff --git a/acqui/lateorders.pl b/acqui/lateorders.pl >index d43dbbe..b68673f 100755 >--- a/acqui/lateorders.pl >+++ b/acqui/lateorders.pl >@@ -116,6 +116,8 @@ if ($op and $op eq "send_alert"){ > $template->param(error_claim => $@); > } elsif ( 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_seleted"){ >+ $template->{VARS}->{'error_claim'} = "no_order_seleted"; > } else { > $template->{VARS}->{'info_claim'} = 1; > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt >index efa0db6..d794d74 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt >@@ -83,6 +83,8 @@ $(document).ready(function() { > [% IF error_claim %] > [% IF ( error_claim == "no_email" ) %] > <div class="error">This vendor has no email</div> >+ [% ELSIF ( error_claim == "no_order_seleted" ) %] >+ <div class="error">No order selected</div> > [% ELSE %] > <div class="error">[% error_claim %]</div> > [% END %] >-- >1.9.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 12505
:
29382
|
31034
|
33527
|
33562
| 33602 |
33603