Bug 12214 - SQL errors in reports are not shown to user
Summary: SQL errors in reports are not shown to user
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: paxed
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-08 07:18 UTC by paxed
Modified: 2014-12-07 20:07 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Fix DB erros not showing to the user (1.76 KB, patch)
2014-05-08 07:21 UTC, paxed
Details | Diff | Splinter Review
Bug 12214: add regression test for reporting error when running report with SQL error (1.41 KB, patch)
2014-05-08 16:13 UTC, Galen Charlton
Details | Diff | Splinter Review
Bug 12214: display SQL errors in reports to users (1.83 KB, patch)
2014-05-08 16:13 UTC, Galen Charlton
Details | Diff | Splinter Review
Bug 12214: (follow-up) correct POD of C4::Reports::Guided::execute_query() (1.02 KB, patch)
2014-05-08 16:13 UTC, Galen Charlton
Details | Diff | Splinter Review
[PASSED QA] Bug 12214: add regression test for reporting error when running report with SQL error (1.47 KB, patch)
2014-05-09 13:36 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
[PASSED QA] Bug 12214: display SQL errors in reports to users (1.90 KB, patch)
2014-05-09 13:36 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
[PASSED QA] Bug 12214: (follow-up) correct POD of C4::Reports::Guided::execute_query() (1.09 KB, patch)
2014-05-09 13:36 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
[PASSED QA] Bug 12214 [QA Followup] - Clean up reports-toolbar.inc, show Edit link when SQL has errors (3.31 KB, patch)
2014-05-09 13:36 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
[PASSED QA] Bug 12214 [QA Followup] - Clean up reports-toolbar.inc, show Edit link when SQL has errors (3.25 KB, patch)
2014-05-09 13:38 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description paxed 2014-05-08 07:18:54 UTC
When a user runs a report containing an SQL error, no
error is shown to the user.

To test:
1) Run a report with known good SQL.
2) No error is shown.
3) Run a report with bad SQL (eg. a typo in field name)
4) No error is shown.
Comment 1 paxed 2014-05-08 07:21:11 UTC Comment hidden (obsolete)
Comment 2 Galen Charlton 2014-05-08 16:13:19 UTC Comment hidden (obsolete)
Comment 3 Galen Charlton 2014-05-08 16:13:26 UTC Comment hidden (obsolete)
Comment 4 Galen Charlton 2014-05-08 16:13:35 UTC Comment hidden (obsolete)
Comment 5 Kyle M Hall (khall) 2014-05-09 13:22:11 UTC
When a report has an error in the query, the page does not display the "Edit" or "Run report" links that are shown for successful reports. While I see no reason have the "Run report" link here. I think having the "Edit" link would be very important!
Comment 6 Kyle M Hall (khall) 2014-05-09 13:36:21 UTC
Created attachment 28132 [details] [review]
[PASSED QA] Bug 12214: add regression test for reporting error when running report with SQL error

To test:

[1] Run prove -v t/db_dependent/Reports_Guided.t. Last test should
    fail.
[2] Apply the main patch.
[3] Run step 1 again.  This time, all tests should pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 7 Kyle M Hall (khall) 2014-05-09 13:36:34 UTC
Created attachment 28133 [details] [review]
[PASSED QA] Bug 12214: display SQL errors in reports to users

When a user runs a report containing an SQL error, no
error is shown to the user.  This patch fixes this.

To test:
1) Run a report with known good SQL.
2) No error is shown.
3) Run a report with bad SQL (eg. a typo in field name)
4) No error is shown.
5) Apply patch
6) Repeat 1-4. For the bad SQL report, the database error
   should be shown.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 8 Kyle M Hall (khall) 2014-05-09 13:36:36 UTC
Created attachment 28134 [details] [review]
[PASSED QA] Bug 12214: (follow-up) correct POD of C4::Reports::Guided::execute_query()

Signed-off-by: Galen Charlton <gmc@esilibrary.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 9 Kyle M Hall (khall) 2014-05-09 13:36:38 UTC Comment hidden (obsolete)
Comment 10 Kyle M Hall (khall) 2014-05-09 13:38:52 UTC
Created attachment 28136 [details] [review]
[PASSED QA] Bug 12214 [QA Followup] - Clean up reports-toolbar.inc, show Edit link when SQL has errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 11 Galen Charlton 2014-05-09 14:50:15 UTC
Pushed to master.  Thanks, Pasi!