Bug 41522 - Make system preferences clickable for warnings in About Koha > System information
Summary: Make system preferences clickable for warnings in About Koha > System informa...
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: About (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Oli Williams
QA Contact: Testopia
URL:
Keywords: Academy
Depends on:
Blocks:
 
Reported: 2026-01-05 14:18 UTC by Magnus Enger
Modified: 2026-02-07 20:54 UTC (History)
2 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: Sponsored
Comma delimited list of Sponsors: Catalyst
Crowdfunding goal: 0
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement makes the system preferences shown in warnings and errors on the About Koha > System information page clickable. Note: Links are only shown for patrons with permission to manage system preferences.
Version(s) released in:
Circulation function:


Attachments
Bug 41522: Make sysprefs clickable in warnings (2.62 KB, patch)
2026-01-21 02:06 UTC, Oli Williams
Details | Diff | Splinter Review
Bug 41522: Make sysprefs clickable in warnings (2.68 KB, patch)
2026-01-21 11:58 UTC, Owen Leonard
Details | Diff | Splinter Review
[WIP] Bug 41522: Make sysprefs clickable in warnings (3.78 KB, patch)
2026-01-21 21:22 UTC, Oli Williams
Details | Diff | Splinter Review
Bug 41522: Make sysprefs clickable in warnings (28.74 KB, patch)
2026-01-23 06:36 UTC, Oli Williams
Details | Diff | Splinter Review
Bug 41522: Make sysprefs clickable in warnings (30.02 KB, patch)
2026-01-27 23:17 UTC, Oli Williams
Details | Diff | Splinter Review
Bug 41522: Remove debug output from clickable sysprefs warning (5.79 KB, patch)
2026-01-31 05:05 UTC, Oli Williams
Details | Diff | Splinter Review
Bug 41522: Make sysprefs clickable in warnings (28.45 KB, patch)
2026-01-31 05:15 UTC, Oli Williams
Details | Diff | Splinter Review
Bug 41522: Make system preferences clickable in warnings (28.46 KB, patch)
2026-02-07 20:35 UTC, David Nind
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Enger 2026-01-05 14:18:55 UTC
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.
Comment 1 Aleisha Amohia 2026-01-20 03:14:48 UTC
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`
Comment 2 Oli Williams 2026-01-21 02:06:25 UTC Comment hidden (obsolete)
Comment 3 Owen Leonard 2026-01-21 11:58:31 UTC
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>
Comment 4 Owen Leonard 2026-01-21 12:02:13 UTC
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.
Comment 5 Oli Williams 2026-01-21 21:22:10 UTC
Created attachment 191838 [details] [review]
[WIP] Bug 41522: Make sysprefs clickable in warnings
Comment 6 Oli Williams 2026-01-23 06:36:32 UTC
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.
Comment 7 Katrin Fischer 2026-01-27 18:59:35 UTC
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
Comment 8 Oli Williams 2026-01-27 23:17:13 UTC
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
Comment 9 Oli Williams 2026-01-31 05:05:19 UTC
Created attachment 192280 [details] [review]
Bug 41522: Remove debug output from clickable sysprefs warning
Comment 10 Oli Williams 2026-01-31 05:15:06 UTC
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
Comment 11 David Nind 2026-02-06 18:38:21 UTC
Just checking if this is ready for sign off yet - status is showing as ASSIGNED.
Comment 12 David Nind 2026-02-07 20:34:43 UTC
(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!
Comment 13 David Nind 2026-02-07 20:35:41 UTC
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>
Comment 14 David Nind 2026-02-07 20:50:35 UTC
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 15 David Nind 2026-02-07 20:54:01 UTC
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