Bug 20807 - Lost items report: Improve the display of CSV profile errors
Summary: Lost items report: Improve the display of CSV profile errors
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 20774
Blocks:
  Show dependency treegraph
 
Reported: 2018-05-23 17:55 UTC by Owen Leonard
Modified: 2019-10-14 19:55 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
Bug 20807: Lost items report: Improve the display of CSV profile errors (5.74 KB, patch)
2018-05-23 18:16 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 20807: Lost items report: Improve the display of CSV profile errors (5.80 KB, patch)
2018-05-23 18:34 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 20807: Lost items report: Improve the display of CSV profile errors (5.84 KB, patch)
2018-06-03 07:58 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 Owen Leonard 2018-05-23 17:55:55 UTC
Currently, if you don't have a "Export lost items in report" CSV profile, the lost items report results will show what looks like a disabled link to exporting selected items. Information about the missing CSV profile is hidden in a title attribute on that link.

I propose that we instead display a message about the missing CSV profile and hide all selection tools and checkboxes.
Comment 1 Owen Leonard 2018-05-23 18:16:18 UTC Comment hidden (obsolete)
Comment 2 Mark Tompsett 2018-05-23 18:34:10 UTC
Created attachment 75513 [details] [review]
Bug 20807: Lost items report: Improve the display of CSV profile errors

This patch modifies the template for the lost items report to change the
way it handles a missing CSV profile. Now, if there is a missing CSV
profile, a message is displayed with details about the profile
requirements. If the logged-in user has the right permission there is a
link to the CSV profiles page.

Since item selection is used only in conjunction with exporting results,
item selection controls are all hidden when there is no valid CSV
profile.

To test, apply the patch go to Reports -> Lost items.

 - Run the report with parameters which will return results.
 - If your system has no CSV profile for exporting lost items:
   - If you are logged in as a user with manage_csv_profiles permission:
     - You should see a message dialog instructing you to create a CSV
       profile with a link to the CSV profiles page.
   - If you are not logged in as a user with manage_csv_profiles
     permission:
     - You should see a similar message but without a link to the CSV
       profiles page.
   - In both cases, with no CSV profile defined there should be no
     checkboxes in the table of results and no "select all/clear all"
     controls.
 - If your system has a valid CSV profile for exporting lost items:
   - Checking the checkbox for one or more items in the table should
     trigger the display of an "Export selected items" link.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 3 Katrin Fischer 2018-06-03 07:58:04 UTC
Created attachment 75746 [details] [review]
Bug 20807: Lost items report: Improve the display of CSV profile errors

This patch modifies the template for the lost items report to change the
way it handles a missing CSV profile. Now, if there is a missing CSV
profile, a message is displayed with details about the profile
requirements. If the logged-in user has the right permission there is a
link to the CSV profiles page.

Since item selection is used only in conjunction with exporting results,
item selection controls are all hidden when there is no valid CSV
profile.

To test, apply the patch go to Reports -> Lost items.

 - Run the report with parameters which will return results.
 - If your system has no CSV profile for exporting lost items:
   - If you are logged in as a user with manage_csv_profiles permission:
     - You should see a message dialog instructing you to create a CSV
       profile with a link to the CSV profiles page.
   - If you are not logged in as a user with manage_csv_profiles
     permission:
     - You should see a similar message but without a link to the CSV
       profiles page.
   - In both cases, with no CSV profile defined there should be no
     checkboxes in the table of results and no "select all/clear all"
     controls.
 - If your system has a valid CSV profile for exporting lost items:
   - Checking the checkbox for one or more items in the table should
     trigger the display of an "Export selected items" link.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Nick Clemens (kidclamp) 2018-07-18 19:13:14 UTC
Awesome work all!

Pushed to master for 18.11
Comment 5 Martin Renvoize (ashimema) 2018-08-02 13:31:31 UTC
Enhancement, will not be backported to 18.05.x series.