[Bug 34962] New: Add a system messages feature to Koha to report issues and failures in a more visible way
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34962 Bug ID: 34962 Summary: Add a system messages feature to Koha to report issues and failures in a more visible way Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Many web projects have a "system messages" area to report cron failures and things like that. These messages are often dismissable. I think it would be great to have a "system messages" table that we could insert things into to make staff aware that something has failed. What I'm imagining is something like wrapping cronjob code in a try/catch and reporting cronjob failures. This would dovetail with action logs. Action logs lot you got searching for issues. This would put the issue right in front of you and would be trigger by actual failures. It could be used to report records with malformed MARC. It could be used to report items that are missing a required field that Koha assumes exists to function, and so on. -- 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=34962 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Table thoughts: id message type message content created on dismissed Put it in the admin section. Any admin would be able to dismiss a system message for everyone. Messages would remain in the database for viewing. Probably want to put something in cleanup_database.pl -- 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=34962 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |kyle@bywatersolutions.com |ity.org | -- 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=34962 Lisette Scheer <lisette.scheer@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lisette.scheer@bywatersolut | |ions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34962 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34962 --- Comment #2 from David Cook <dcook@prosentient.com.au> --- If/when we have a Content-Security-Policy, this could be useful for CSP violation reports. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34962 --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- I think for an initial development, we could show a table of messages with the date/time, a "component" ( basically the module of Koha this is part of ), and the message itself. For example, if EDI can't connect to an FTP server for a vendor EDI profile, would could have a component of "Acquisitions/EDI" and a message like "Unable to connect to remote server: Failed to connect to $vendor_ftp_host for $vendor_description ($vendor_id)". It seems like anything connection to an external service should take advantage of this kind of feature. Table columns could be something like: timestamp component message cleared (timestamp) The screen would have a "clear all" button to set cleared. Cleared messages would not show in the staff interface, but would remain in the table until the cleared messages are deleted by the cleanup database cronjob. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34962 Katie Bliss <kebliss@dmpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kebliss@dmpl.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34962 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |magnus@libriotech.no -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34962 Angela Berrett <angela.berrett@familysearch.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |angela.berrett@familysearch | |.org --- Comment #4 from Angela Berrett <angela.berrett@familysearch.org> --- +1 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34962 --- Comment #5 from David Cook <dcook@prosentient.com.au> --- Still a +1 from me. I've been meaning to add this into other projects as well actually. Another consideration could be other forms of notification. Do we want to send emails to a configurable list of admins when one is added to this table? This could also be a follow-up, so long as we think about the database design of how it could be easily extended. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34962 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |43295 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43295 [Bug 43295] Add ability to report external authentication service failures when falling back to local auth -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34962 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |43597 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43597 [Bug 43597] Add system message for templates that fail to parse -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34962 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34962 --- Comment #6 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 208076 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208076&action=edit Bug 34962: Update database Patch from commit cf24651 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34962 --- Comment #7 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 208077 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208077&action=edit Bug 34962: Add Koha Object(s) for system messages Patch from commit 237f804 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34962 --- Comment #8 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 208078 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208078&action=edit Bug 34962: Add unit tests Patch from commit 1da1231 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34962 --- Comment #9 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 208079 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208079&action=edit Bug 34962: Add REST API for system messages This patch adds three routes: GET /api/v1/system_messages List system messages ( view_system_messages or manage_system_messages ) PUT /api/v1/system_messages/{system_message_id}/clear Clear one message ( manage_system_messages ) PUT /api/v1/system_messages/clear Clear every uncleared message ( manage_system_messages ) Test Plan: 1) Apply this patch 2) yarn api:bundle 3) prove t/db_dependent/api/v1/system_messages.t xt/api.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34962 --- Comment #10 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 208080 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208080&action=edit Bug 34962: Add system messages page to administration Many web applications have a "system messages" area to report failures in a more visible way than a log file. Currently, when something in Koha fails in the background ( a cron job, a connection to an external service, a notice that won't render ) the only trace is in a log file that most librarians never see. This patch adds a system messages page to the administration module. It lists the messages Koha has recorded in a datatable fed by the REST API, hides cleared messages by default, and lets a librarian with the manage_system_messages permission clear a single message or all of them. A librarian with only view_system_messages gets a read-only table. Cleared messages stay in the table until cleanup_database.pl removes them. Clearing is not written to the action logs, the cleared date on the row is the record of it. Test Plan: 1) Apply this patch 2) Run updatedatabase.pl 3) yarn build 4) Restart all the things! 5) Give one staff user the "View system messages" permission and another the "Manage system messages" permission 6) Add some messages from a shell, e.g. perl -MKoha::SystemMessages -e 'Koha::SystemMessages->add({ component => "Notices", message => "Something failed" }) for 1..3' 7) Browse to Administration > System messages 8) Note the message shows once with 3 occurrences! 9) As the "view" user, note there is no Clear button and no Clear all button 10) As the "manage" user, clear the message, note it disappears! 11) Check "Show cleared messages", note it is listed with its cleared date! 12) Add two more messages, click "Clear all", note both are cleared! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34962 --- Comment #11 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 208081 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208081&action=edit Bug 34962: Show uncleared system messages on the staff interface main page Test Plan: 1) Apply this patch 2) Add a system message ( see the previous patch ) 3) Log in as a user with the view_system_messages or manage_system_messages permission 4) Note the "System messages: 1" entry in the pending box on the main page! 5) Clear the message, note the entry is gone! 6) Log in as a user with neither permission, note the entry never shows -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34962 --- Comment #12 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 208082 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208082&action=edit Bug 34962: Add ability to purge cleared system messages to cleanup_database.pl Test Plan: 1) Apply this patch 2) Clear a system message, then set its cleared_date to 40 days ago UPDATE system_messages SET cleared_date = DATE_SUB( NOW(), INTERVAL 40 DAY ) WHERE cleared_date IS NOT NULL; 3) perl misc/cronjobs/cleanup_database.pl --system-messages --verbose 4) Note the message would have been purged, but still exists 5) perl misc/cronjobs/cleanup_database.pl --system-messages --verbose --confirm 6) Note the message is gone and uncleared messages are untouched! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34962 --- Comment #13 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 208083 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208083&action=edit Bug 34962: Update Schema files [DO NOT PUSH] Patch from commit 4140f9f -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34962 Frédéric Demians <f.demians@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |f.demians@tamil.fr --- Comment #14 from Frédéric Demians <f.demians@tamil.fr> --- Thanks for the rebase. Patches apply. Works now as described in the test plan. A column is only displayed on pages where it has values. Holdings_spec.ts passes. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34962 --- Comment #15 from Frédéric Demians <f.demians@tamil.fr> --- Comment 14 if for another bug. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org