Bug 16782 - Display JSON report URL in staff client report interface
Summary: Display JSON report URL in staff client report interface
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Liz Rea
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-20 23:40 UTC by Liz Rea
Modified: 2018-12-03 20:05 UTC (History)
4 users (show)

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


Attachments
Bug 16782 - disclose URL for public reports on the saved report page (1.95 KB, patch)
2017-10-19 03:28 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 16782 - disclose URL for public reports on the saved report page (1.98 KB, patch)
2017-10-19 03:29 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 16782 - disclose URL for public reports on the saved report page (2.04 KB, patch)
2017-10-23 22:11 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 16782: Fix spelling of 'Available' (1.48 KB, patch)
2017-10-23 22:11 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 16782 - disclose URL for public reports on the saved report page (2.04 KB, patch)
2017-10-26 15:09 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 16782: Fix spelling of 'Available' (1.48 KB, patch)
2017-10-26 15:09 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 16782: QA Followup - use a link instead of showing full URL (1.47 KB, patch)
2017-10-26 15:09 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 16782 - disclose JSON URL for reports on the saved report page (3.44 KB, patch)
2017-10-26 20:33 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 16782 - disclose JSON URL for reports on the saved report page (3.49 KB, patch)
2017-10-27 00:52 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 16782 - missing </td>, fixed now (1.12 KB, patch)
2017-10-27 01:29 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 16782 - disclose JSON URL for reports on the saved report page (3.49 KB, patch)
2018-01-08 15:40 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 16782 - missing </td>, fixed now (1.12 KB, patch)
2018-01-08 15:40 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 16782: (QA Followup) Use Koha.Preference for staffClientBaseURL and provide classes (3.03 KB, patch)
2018-01-08 15:40 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 16782: Use uri filter instead of html (1.86 KB, patch)
2018-01-09 20:21 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Liz Rea 2016-06-20 23:40:23 UTC
If you have marked a report as public, one ought to be able to easily find the URL of the report to use from within the staff client.

Possible locations for this are as another column (or link) in the table of saved reports, a link or text from the "Report created, what now?" page, or an automatic category of report that shows all public reports, with their OPAC links.
Comment 1 Liz Rea 2017-10-19 03:28:04 UTC
Created attachment 68286 [details] [review]
Bug 16782 - disclose URL for public reports on the saved report page

It has always annoyed me that you had to look at the help to divine the url for a public report.
This patch works it out and displays it for you.

Requirements:
- OPACBaseURL must be set for the url to be complete. It's ok if it's not, but it's better if it is.
- You must have a saved report that is public to your OPAC.

To test:
- create a public saved report. It can be anything.
- view the saved reports page, note that under Public it says: Avaliable at (opacbaseurl)/cgi-bin/koha/svc/report?id=1
- clicking it should take you to the public results of your report.

sponsored-by: Catalyst IT
Comment 2 Liz Rea 2017-10-19 03:29:25 UTC
Created attachment 68287 [details] [review]
Bug 16782 - disclose URL for public reports on the saved report page

It has always annoyed me that you had to look at the help to divine the url for a public report.
This patch works it out and displays it for you.

Requirements:
- OPACBaseURL must be set for the url to be complete. It's ok if it's not, but it's better if it is.
- You must have a saved report that is public to your OPAC.

To test:
- create a public saved report. It can be anything.
- view the saved reports page, note that under Public it says: Avaliable at (opacbaseurl)/cgi-bin/koha/svc/report?id=1
- copying and pasting that into the address bar should take you to the public results of your report.

sponsored-by: Catalyst IT
Comment 3 Hugo Agud 2017-10-23 12:53:22 UTC
We have applied the patch we have found

1. It works as expected BUT if you modify the report, the new results doesn't appear until you clean cache and restart plack --> perhaps it is not related with this patch, but it fails.

2. we have seen that the info of the report if given in json format, it is nice for managin that, but is that the expected behaviour?
Comment 4 Liz Rea 2017-10-23 20:26:04 UTC
This patch does not touch the functionality of the public reports. Set the cache timer to a low value (not 0, 0 means it never refreshes) if you want to have instant-ish updates.

Yes, JSON is the expected behaviour.

Cheers,
Liz
Comment 5 Josef Moravec 2017-10-23 22:11:13 UTC
Created attachment 68446 [details] [review]
Bug 16782 - disclose URL for public reports on the saved report page

It has always annoyed me that you had to look at the help to divine the url for a public report.
This patch works it out and displays it for you.

Requirements:
- OPACBaseURL must be set for the url to be complete. It's ok if it's not, but it's better if it is.
- You must have a saved report that is public to your OPAC.

To test:
- create a public saved report. It can be anything.
- view the saved reports page, note that under Public it says: Avaliable at (opacbaseurl)/cgi-bin/koha/svc/report?id=1
- copying and pasting that into the address bar should take you to the public results of your report.

sponsored-by: Catalyst IT

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 6 Josef Moravec 2017-10-23 22:11:17 UTC
Created attachment 68447 [details] [review]
Bug 16782: Fix spelling of 'Available'

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 7 Liz Rea 2017-10-23 22:14:00 UTC
Doh thanks for catching that. :D
Comment 8 Nick Clemens 2017-10-26 15:09:19 UTC
Created attachment 68619 [details] [review]
Bug 16782 - disclose URL for public reports on the saved report page

It has always annoyed me that you had to look at the help to divine the url for a public report.
This patch works it out and displays it for you.

Requirements:
- OPACBaseURL must be set for the url to be complete. It's ok if it's not, but it's better if it is.
- You must have a saved report that is public to your OPAC.

To test:
- create a public saved report. It can be anything.
- view the saved reports page, note that under Public it says: Avaliable at (opacbaseurl)/cgi-bin/koha/svc/report?id=1
- copying and pasting that into the address bar should take you to the public results of your report.

sponsored-by: Catalyst IT

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 9 Nick Clemens 2017-10-26 15:09:22 UTC
Created attachment 68620 [details] [review]
Bug 16782: Fix spelling of 'Available'

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 10 Nick Clemens 2017-10-26 15:09:24 UTC
Created attachment 68621 [details] [review]
Bug 16782: QA Followup - use a link instead of showing full URL
Comment 11 Nick Clemens 2017-10-26 15:10:03 UTC
Display was a bit long, took the liberty of using a link instead of the URL, hope that's okay
Comment 12 Katrin Fischer 2017-10-26 16:41:59 UTC
Should we show the URL for non-public too? They are automatically available under the staff url, when set to not public.
Comment 13 Liz Rea 2017-10-26 20:04:13 UTC
Ha, I originally had it as a link, but decided not to in the end because it was awkward when OPACBaseURL wasn't set. Plus you never click on it, you only ever use it in code, so not much reason to be clickable.

Cheers,
Liz
Comment 14 Liz Rea 2017-10-26 20:08:39 UTC
Regarding showing the non-public, that's fine. I'll do a catchall followup that does it how I want it to be done.

Cheers,
Liz
Comment 15 Liz Rea 2017-10-26 20:33:30 UTC
Created attachment 68639 [details] [review]
Bug 16782 - disclose JSON URL for reports on the saved report page

It has always annoyed me that you had to look at the help to divine the url for a report.
This patch works it out and displays it for you in a new column on the saved reports table.

Requirements:
- OPACBaseURL and staffClientBaseURL preferences must be set for the urls to be complete. It's ok if they are not, but it's better if they are.
- You must have a saved report that is public to your OPAC, and one that is not public.

To test:
- create a public saved report and a private staff report. They can be anything.
- view the saved reports page, note that under a new heading of JSON URL the link to the json feed for that report shows.
- copying and pasting that link into the address bar, or clicking it, should take you to the results of the selected report.

sponsored-by: Catalyst IT
Comment 16 Mark Tompsett 2017-10-27 00:52:16 UTC
Created attachment 68648 [details] [review]
Bug 16782 - disclose JSON URL for reports on the saved report page

It has always annoyed me that you had to look at the help to divine the url for a report.
This patch works it out and displays it for you in a new column on the saved reports table.

Requirements:
- OPACBaseURL and staffClientBaseURL preferences must be set for the urls to be complete. It's ok if they are not, but it's better if they are.
- You must have a saved report that is public to your OPAC, and one that is not public.

To test:
- create a public saved report and a private staff report. They can be anything.
- view the saved reports page, note that under a new heading of JSON URL the link to the json feed for that report shows.
- copying and pasting that link into the address bar, or clicking it, should take you to the results of the selected report.

sponsored-by: Catalyst IT

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 17 Liz Rea 2017-10-27 01:29:27 UTC
Created attachment 68649 [details] [review]
Bug 16782 - missing </td>, fixed now
Comment 18 Liz Rea 2018-01-02 21:46:54 UTC
Thankfully this still applies. :)
Comment 19 Nick Clemens 2018-01-08 15:40:00 UTC
Created attachment 70322 [details] [review]
Bug 16782 - disclose JSON URL for reports on the saved report page

It has always annoyed me that you had to look at the help to divine the url for a report.
This patch works it out and displays it for you in a new column on the saved reports table.

Requirements:
- OPACBaseURL and staffClientBaseURL preferences must be set for the urls to be complete. It's ok if they are not, but it's better if they are.
- You must have a saved report that is public to your OPAC, and one that is not public.

To test:
- create a public saved report and a private staff report. They can be anything.
- view the saved reports page, note that under a new heading of JSON URL the link to the json feed for that report shows.
- copying and pasting that link into the address bar, or clicking it, should take you to the results of the selected report.

sponsored-by: Catalyst IT

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 20 Nick Clemens 2018-01-08 15:40:03 UTC
Created attachment 70323 [details] [review]
Bug 16782 - missing </td>, fixed now
Comment 21 Nick Clemens 2018-01-08 15:40:06 UTC
Created attachment 70324 [details] [review]
Bug 16782: (QA Followup) Use Koha.Preference for staffClientBaseURL and provide classes
Comment 22 Jonathan Druart 2018-01-09 20:21:15 UTC
Created attachment 70395 [details] [review]
Bug 16782: Use uri filter instead of html
Comment 23 Liz Rea 2018-01-09 20:26:35 UTC
You could have asked me to fix those things, I'd have been happy to.

Thank you for the extra patches all the same.

Liz
Comment 24 Jonathan Druart 2018-01-09 20:27:42 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 25 Nick Clemens 2018-01-15 16:49:01 UTC
Awesome work all, pushed to stable for 17.11.02
Comment 26 Liz Rea 2018-01-15 20:01:50 UTC
Hm, this'd be a feature not a bug. It's harmless but we should remember not to push features to stable branches.

Cheers,
Liz
Comment 27 Fridolin Somers 2018-01-22 11:28:09 UTC
Enhancement not pushed to 17.05.x