[Bug 41522] New: Make sysprefs clickable in warnings
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 Bug ID: 41522 Summary: Make sysprefs clickable in warnings Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: About Assignee: koha-bugs@lists.koha-community.org Reporter: magnus@libriotech.no QA Contact: testopia@bugs.koha-community.org 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. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Academy -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aleisha@catalyst.net.nz --- Comment #1 from Aleisha Amohia <aleisha@catalyst.net.nz> --- 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` -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 Oli Williams <imhungryoliver@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 --- Comment #2 from Oli Williams <imhungryoliver@gmail.com> --- Created attachment 191735 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191735&action=edit Bug 41522: Make sysprefs clickable in warnings Modified system information warnings to have hyperlinks to their system preferences page. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |imhungryoliver@gmail.com |ity.org | Sponsorship status|--- |Sponsored Comma delimited| |Catalyst list of Sponsors| | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #191735|0 |1 is obsolete| | --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 191776 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191776&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 --- Comment #4 from 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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=41674 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 --- Comment #5 from Oli Williams <imhungryoliver@gmail.com> --- Created attachment 191838 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191838&action=edit [WIP] Bug 41522: Make sysprefs clickable in warnings -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 Oli Williams <imhungryoliver@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #191776|0 |1 is obsolete| | Attachment #191838|0 |1 is obsolete| | --- Comment #6 from Oli Williams <imhungryoliver@gmail.com> --- Created attachment 191894 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191894&action=edit 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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Patch doesn't apply -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 Oli Williams <imhungryoliver@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #191894|0 |1 is obsolete| | --- Comment #8 from Oli Williams <imhungryoliver@gmail.com> --- Created attachment 192115 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192115&action=edit 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 --- Comment #9 from Oli Williams <imhungryoliver@gmail.com> --- Created attachment 192280 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192280&action=edit Bug 41522: Remove debug output from clickable sysprefs warning -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 Oli Williams <imhungryoliver@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 Oli Williams <imhungryoliver@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #192115|0 |1 is obsolete| | Attachment #192280|0 |1 is obsolete| | --- Comment #10 from Oli Williams <imhungryoliver@gmail.com> --- Created attachment 192281 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192281&action=edit 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 --- Comment #11 from David Nind <david@davidnind.com> --- Just checking if this is ready for sign off yet - status is showing as ASSIGNED. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 Oli Williams <imhungryoliver@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 --- Comment #12 from David Nind <david@davidnind.com> --- (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! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 --- Comment #13 from David Nind <david@davidnind.com> --- Created attachment 192682 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192682&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This enhancement makes the release notes| |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. Summary|Make sysprefs clickable in |Make system preferences |warnings |clickable for warnings in | |About Koha > System | |information --- Comment #14 from 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #192281|0 |1 is obsolete| | --- Comment #15 from David Nind <david@davidnind.com> --- Comment on attachment 192281 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192281 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@gmail.com Status|Signed Off |Failed QA --- Comment #16 from Jonathan Druart <jonathan.druart@gmail.com> --- You shouldn't cut the sentences, it makes them hard to translate. Instead you should use KohaSpan, like that: admin/curbside_pickup.tt: <div class="alert alert-info">The [% pref_CurbsidePickup_link | $raw | $KohaSpan %] preference is not enabled, do not forget to enable it to turn the feature on.</div> In your examples, you should not spit the sentences with Template::Toolkit tags, but do repetitions instead. I would suggest: [% IF UserHasSysPrefsPerm %] [% SET pref_RequireChoosingExistingAuthority_link = '<a href="admin/preferences.pl?op=search&searchfield=RequireChoosingExistingAuthority&ok=Search">RequireChoosingExistingAuthority</a>' %] [% SET pref_AutoCreateAuthorities_link = '<a href="admin/preferences.pl?op=search&searchfield=AutoCreateAuthorities&ok=Search">AutoCreateAuthorities</a>' %] <p>System preference [% pref_RequireChoosingExistingAuthority_link | $raw | $KohaSpan %] is disabled, but needs [% pref_AutoCreateAuthorities_link | $raw | $KohaSpan %] enabled.</p> [% ELSE %] <p>System preference 'RequireChoosingExistingAuthority' is disabled, but needs 'AutoCreateAuthorities' enabled.</p> [% END %] <p>Otherwise catalogers can add headings that will not be linked to authorities.</p> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 --- Comment #17 from Jonathan Druart <jonathan.druart@gmail.com> --- Also see bug 41674. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 --- Comment #18 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Jonathan Druart from comment #17)
Also see bug 41674.
The solution provided by this bug (the TT plugin) is the way to go! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Comma delimited|Catalyst |Catalyst IT list of Sponsors| | Status|Failed QA |Needs Signoff Depends on| |41674 Assignee|imhungryoliver@gmail.com |aleisha@catalyst.net.nz Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41674 [Bug 41674] Add template plugin for linking to system preferences based on user permission -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #192682|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 --- Comment #19 from Aleisha Amohia <aleisha@catalyst.net.nz> --- Created attachment 201417 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201417&action=edit Bug 41522: Make system preferences clickable in About.pl warnings This patch uses the LinkPref TT plugin to make system preferences warnings/errors in About -> 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 (See comment 14 for more detailed notes from David Nind on reproducing warnings.) Sponsored-by: Catalyst IT -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201417|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41522 --- Comment #20 from David Nind <david@davidnind.com> --- Created attachment 201473 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201473&action=edit Bug 41522: Make system preferences clickable in About.pl warnings This patch uses the LinkPref TT plugin to make system preferences warnings/errors in About -> 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 (See comment 14 for more detailed notes from David Nind on reproducing warnings.) Sponsored-by: Catalyst IT Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org