Bugzilla – Attachment 37935 Details for
Bug 13992
Software error in reports if field or table does not exist
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 13992 - Software error in reports if field or table does not exist
PASSED-QA-Bug-13992---Software-error-in-reports-if.patch (text/plain), 2.00 KB, created by
Katrin Fischer
on 2015-04-15 22:05:33 UTC
(
hide
)
Description:
[PASSED QA] Bug 13992 - Software error in reports if field or table does not exist
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2015-04-15 22:05:33 UTC
Size:
2.00 KB
patch
obsolete
>From c5bf335856df1ec1e50be3049d9b05d7ba65d59d Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Tue, 14 Apr 2015 10:28:03 +0200 >Subject: [PATCH] [PASSED QA] Bug 13992 - Software error in reports if field or > table does not exist > >To reproduce: > >- Go to Home > Reports Guided reports wizard >- Create report from SQL >- Enter something like: select holdrio from borrowers >- Save SQL >- run report > >Result: >Can't use an undefined value as an ARRAY reference at /usr/share/kohaclone/reports/guided_reports.pl line 932. >expected: graceful error message > >- Change sql to something like: select id from holdrio; >- Save SQL >- Run report > >Result: >Can't use an undefined value as an ARRAY reference at /usr/share/kohaclone/reports/guided_reports.pl line 932. >expected: graceful error message > >- Change sql to something like: pling from plong >- Save SQL >Result (after saving): Message "The database returned the following error: 1" >Expected: Meaningful message "The database returned the following error: No SELECT" (similar to forbidden statements as UPDATE) > >Test plan: >- Apply patch >- Try to reproduce issues above. They should be resolved. > >Signed-off-by: Nick Clemens <nick@quecheelibrary.org> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > reports/guided_reports.pl | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl >index a3009b2..2b9875f 100755 >--- a/reports/guided_reports.pl >+++ b/reports/guided_reports.pl >@@ -192,7 +192,7 @@ elsif ( $phase eq 'Update SQL'){ > push @errors, {sqlerr => $1}; > } > elsif ($sql !~ /^(SELECT)/i) { >- push @errors, {queryerr => 1}; >+ push @errors, {queryerr => "No SELECT"}; > } > > if (@errors) { >@@ -929,6 +929,7 @@ elsif ($phase eq 'Save Compound'){ > # pass $sth, get back an array of names for the column headers > sub header_cell_values { > my $sth = shift or return (); >+ return '' unless ($sth->{NAME}); > return @{$sth->{NAME}}; > } > >-- >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 13992
:
37796
|
37911
| 37935