Bug 26708 - Add option to preview SQL from list of saved reports
Summary: Add option to preview SQL from list of saved reports
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords: Manual
Depends on:
Blocks:
 
Reported: 2020-10-16 14:48 UTC by Barbara Johnson
Modified: 2021-06-14 21:35 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Text to go in the release notes:
This patch adds the option to preview a saved report's SQL directly from the list of saved reports. From this preview the user can edit the report, duplicate it, schedule it, run it, or delete it.
Version(s) released in:
21.05.00


Attachments
Bug 26708: Add SQL popup when hovering over name of report (7.35 KB, patch)
2021-01-28 15:49 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 26708: Add SQL popup when hovering over name of report (7.81 KB, patch)
2021-01-28 16:27 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 26708: Add SQL popup when hovering over name of report (7.41 KB, patch)
2021-01-28 16:38 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 26708: Add SQL popup when hovering over name of report (7.47 KB, patch)
2021-02-07 12:47 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Barbara Johnson 2020-10-16 14:48:04 UTC
In Mana, when you hover over the information in the Notes column you get a popup box that shows the SQL code.  It would be nice to incorporate this functionality into the list of saved reports in Koha.  We don't always have notes information for our reports and the title doesn't always reveal what it is supposed to do.  Being able to see the SQL code without having to open it would be helpful.  Maybe providing this information in a popup when you hover over the report name would work.  Also, this might not be functionality that every library would want so being able to opt in or out would be good.
Comment 1 George Williams (NEKLS) 2020-11-10 17:41:46 UTC
This is a really good idea.
Comment 2 Ed Veal 2020-11-10 17:42:20 UTC
I agree.
Comment 3 Owen Leonard 2021-01-28 15:49:21 UTC Comment hidden (obsolete)
Comment 4 Owen Leonard 2021-01-28 16:27:28 UTC Comment hidden (obsolete)
Comment 5 PTFS Europe Sandboxes 2021-01-28 16:38:56 UTC
Created attachment 115974 [details] [review]
Bug 26708: Add SQL popup when hovering over name of report

This patch adds an option to preview a report's SQL by selecting
"Preview SQL" from the "Actions" menu.

To test, apply the patch and go to Reports -> Saved reports.

 - In the table listing saved reports, open the "Actions" pop-up menu
   and click the "Preview SQL" link.
 - You should be shown a modal with a syntax-highlighted view of the SQL
   code.
 - The footer of the modal should have options for Edit, Duplicate,
   Schedule, Delete, Run report, and Close.
 - Test that all these buttons work correctly.
 - Test that all of these features work correctly any page of the saved
   reports DataTable.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Comment 6 Barbara Johnson 2021-01-28 16:40:59 UTC
I really like this popup for previewing the SQL and that it includes all of the different actions right from the popup.
Comment 7 Katrin Fischer 2021-01-28 22:39:02 UTC
I wonder if this should not replace the "View" which does the same as the "Preview" now. Is there a reason to keep both?

Can you please also adjust the bug description as this has now been solved a little differently than initially suggested?
Comment 8 Owen Leonard 2021-01-29 12:21:18 UTC
(In reply to Katrin Fischer from comment #7)
> I wonder if this should not replace the "View" which does the same as the
> "Preview" now. Is there a reason to keep both?

I think a static page is always a good option to have--opening the view in a new tab, for instance, for referring to without worrying that the modal will close because of an accidental click.
Comment 9 Katrin Fischer 2021-02-07 12:47:52 UTC
Created attachment 116473 [details] [review]
Bug 26708: Add SQL popup when hovering over name of report

This patch adds an option to preview a report's SQL by selecting
"Preview SQL" from the "Actions" menu.

To test, apply the patch and go to Reports -> Saved reports.

 - In the table listing saved reports, open the "Actions" pop-up menu
   and click the "Preview SQL" link.
 - You should be shown a modal with a syntax-highlighted view of the SQL
   code.
 - The footer of the modal should have options for Edit, Duplicate,
   Schedule, Delete, Run report, and Close.
 - Test that all these buttons work correctly.
 - Test that all of these features work correctly any page of the saved
   reports DataTable.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Jonathan Druart 2021-02-08 16:04:44 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 11 Fridolin Somers 2021-02-12 14:13:46 UTC
Enhancement not pushed to 20.11.x
Comment 12 Fridolin Somers 2021-02-12 14:16:56 UTC
In my opinion, this may replace the "View" action