On "About Koha > System information" there can be warnings like this: Warnings regarding the system configuration Preferences and parameters Warning System preference 'RequireChoosingExistingAuthority' is disabled, but needs 'AutoCreateAuthorities' enabled. Otherwise catalogers can add headings that will not be linked to authorities. Warning System preference 'ILLOpacUnauthenticatedRequest' must be '0' or '1', but is ''. It would be helpful to turn the sysprefs into links that point to the actual syspref, instead of having just the name.
Tip for the developer: These warnings are found in `koha-tmpl/intranet-tmpl/prog/en/modules/about.tt` The link for the syspref will look something like `/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=SYSPREFNAME`
Created attachment 191735 [details] [review] Bug 41522: Make sysprefs clickable in warnings Modified system information warnings to have hyperlinks to their system preferences page.
Created attachment 191776 [details] [review] Bug 41522: Make sysprefs clickable in warnings Modified system information warnings to have hyperlinks to their system preferences page. Signed-off-by: Owen Leonard <oleonard@myacpl.org>
This could use a follow-up to make the same changes to some other instances of system preference names on the page: AnonSuggestions EasyAnalyticalRecords ILLPartnerCode KohaAdminEmailAddress NotifyPasswordChange OpacHiddenItems OPACPrivacy PatronSelfRegistration Pseudonymization RESTOAuth2ClientCredentials StatisticsFields It would also be great to wrap these links in a permission check in case the user doesn't have access to system preferences.
Created attachment 191838 [details] [review] [WIP] Bug 41522: Make sysprefs clickable in warnings
Created attachment 191894 [details] [review] Bug 41522: Make sysprefs clickable in warnings Modified system information warnings and errors to have hyperlinks to their preferences page for users with the correct permissions for better navigation.
Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 41522: Make sysprefs clickable in warnings error: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/about.tt). error: could not build fake ancestor Patch failed at 0001 Bug 41522: Make sysprefs clickable in warnings hint: Use 'git am --show-current-patch=diff' to see the failed patch When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-41522-Make-sysprefs-clickable-in-warnings-70x67tnr.patch
Created attachment 192115 [details] [review] Bug 41522: Make sysprefs clickable in warnings This patch makes the system preferences warnings/errors in system information clickable, linking to the system preferences page. Links are only shown to users with permissions to manage system preferences. Test plan: 1. Log in as a user with the superlibrarian or manage_sysprefs permission 2. Go to More -> About Koha -> System information 3. Verify warnings containing system preferences names are clickable and lead to the correct preference (to check all messages, you must manually trigger the warnings via incorrect settings or direct database modification) 4. Log in as a user without the superlibrarian and manage_sysprefs permission 5. Verify preference names are not links
Created attachment 192280 [details] [review] Bug 41522: Remove debug output from clickable sysprefs warning
Created attachment 192281 [details] [review] Bug 41522: Make sysprefs clickable in warnings This patch makes the system preferences warnings/errors in system information clickable, linking to the system preferences page. Links are only shown to users with permissions to manage system preferences. Test plan: 1. Log in as a user with the superlibrarian or manage_sysprefs permission 2. Go to More -> About Koha -> System information 3. Verify warnings containing system preferences names are clickable and lead to the correct preference (to check all messages, you must manually trigger the warnings via incorrect settings or direct database modification) 4. Log in as a user without the superlibrarian and manage_sysprefs permission 5. Verify preference names are not links Bug 41522: Remove debug output from clickable sysprefs warning
Just checking if this is ready for sign off yet - status is showing as ASSIGNED.
(In reply to David Nind from comment #11) > Just checking if this is ready for sign off yet - status is showing as > ASSIGNED. Thanks for updating the status Oli!
Created attachment 192682 [details] [review] Bug 41522: Make system preferences clickable in warnings This patch makes the system preferences warnings/errors in system information clickable, linking to the system preferences page. Links are only shown to users with permissions to manage system preferences. Test plan: 1. Log in as a user with the superlibrarian or manage_sysprefs permission 2. Go to More -> About Koha -> System information 3. Verify warnings containing system preferences names are clickable and lead to the correct preference (to check all messages, you must manually trigger the warnings via incorrect settings or direct database modification) 4. Log in as a user without the superlibrarian and manage_sysprefs permission 5. Verify preference names are not links Signed-off-by: David Nind <david@davidnind.com>
Testing notes (using KTD): 1. I tested some of the warnings with system preference links. I couldn't figure out how to make some appear. 2. I added a password to Henry's patron account and set these permissions: - Check out and check in items (circulate) - Staff access, allows viewing of catalogue in staff interface (catalogue) 3. To generate some warnings that required updates to the database: - koha-mysql kohadev - restart everything after the SQL is run: restart_all - Refresh the About Koha > System information page 4. Use this SQL to generate warnings that require updates to the database: - KohaAdminEmailAddress: update systempreferences set value="invalidemailaddress" where variable="KohaAdminEmailAddress"; - StatisticsFields: update systempreferences set value="location|itype|ccode|invalidfield" where variable="StatisticsFields"; - Pseudonymization: update systempreferences set value="1" where variable="Pseudonymization"; 5. Generate warnings that only require updates using the staff interface: - PatronSelfRegistrationDefaultCategory: set so that no patron category selected - NotifyPasswordChange: delete the PASSWORD_CHANGE notice (Tools > Notices and slips) - Enable ILLModule and set ILLPartnerCode to no value - Set AnonSuggestions = "Allow", and make sure that AnonymousPatron is empty
Comment on attachment 192281 [details] [review] Bug 41522: Make sysprefs clickable in warnings I updated the commit message: - Update the title (system preferences in full) - Removed the link to the bug at the bottom of the commit message