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.
Created attachment 28044 [details] [review] Fix DB erros not showing to the user 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. 5) Apply patch 6) Repeat 1-4. For the bad SQL report, the database error should be shown.
Created attachment 28115 [details] [review] 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>
Created attachment 28116 [details] [review] 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>
Created attachment 28117 [details] [review] Bug 12214: (follow-up) correct POD of C4::Reports::Guided::execute_query() Signed-off-by: Galen Charlton <gmc@esilibrary.com>
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!
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>
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>
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>
Created attachment 28135 [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> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
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>
Pushed to master. Thanks, Pasi!