Repository-Metriken
- Stars
- (32.880 Sterne)
- PR-Merge-Metriken
- (PR-Metriken ausstehend)
Beschreibung
This is a ticket for the Incident Collaboration plugin.
Add a new toggle to the automation tab in the backstage to enable or disable this feature, and export the channel using the Channel Export plugin when the incident status is updated to Archived.
You can take a look at other automations already implemented to get an idea of the work needed for this ticket:
- Invite users on incident creation: https://github.com/mattermost/mattermost-plugin-incident-collaboration/pull/440
- Assign commander on incident creation: https://github.com/mattermost/mattermost-plugin-incident-collaboration/pull/483
- Announce incident on another channel on incident creation: https://github.com/mattermost/mattermost-plugin-incident-collaboration/pull/495
- Send an outgoing webhook on incident creation: https://github.com/mattermost/mattermost-plugin-incident-collaboration/pull/503
Backend work
- Add a new database migration that adds the following columns:
1. On the
IR_Playbooktable, add:- a boolean column named
ExportChannelOnArchiveEnabled. 1. On theIR_Incidenttable, add: - a boolean column named
ExportChannelOnArchiveEnabled.
- a boolean column named
- For each new column, add the corresponding fields to the server’s
PlaybookandIncidenttypes. This will break some of the tests, so make sure to runmake testand update the ones that are failing. - Update the select queries in each of the Playbook and Incident SQL stores so the new columns are retrieved by default.
- In the API’s
createIncidentfunction, copy the value from theExportChannelOnArchiveEnabledfield from the playbook to the incident. - In the incident service’s
UpdateStatusfunction, when the status is successfully updated toArchived, export the channel. The exported file should be sent to the incident's commander.
Frontend work
- Update the webapp’s
Playbooktype with the new field added to the data model in the server. - Add a new component
ExportChannelOnArchive, which should be a simple toggle. - Update the
AutomationSettingscomponent to add a newSettingto the section “When an incident is archived” (create the section if it does not exist yet), that includes the newExportChannelOnArchive. You will need to update the props to receive the new values and functions that theExportChannelOnArchivecomponent will need. - In the
PlaybookEditcomponent, create the necessary function to handle toggle of the newExportChannelOnArchivecomponent, and pass that function and the corresponding value to theAutomationSettingscomponent.
Testing
- Add an E2E test checking that the exported file is successfully posted to the incident’s channel when the incident’s status is updated to
Archived.
If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.
New contributors please see our Developer's Guide.