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.
Created attachment 75512 [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.
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>
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>
Awesome work all! Pushed to master for 18.11
Enhancement, will not be backported to 18.05.x series.