mattermost/mattermost

Export channel on incident archive

Offen

#17.311 geöffnet am 31.03.2021

 (13 Kommentare) (0 Reaktionen) (1 zugewiesene Person)TypeScript (7.823 Forks)batch import
Area/IntegrationsDifficulty/2:MediumHacktoberfestHelp WantedTech/GoTech/ReactJS

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:

Backend work

  1. Add a new database migration that adds the following columns: 1. On the IR_Playbook table, add:
    1. a boolean column named ExportChannelOnArchiveEnabled. 1. On the IR_Incident table, add:
    2. a boolean column named ExportChannelOnArchiveEnabled.
  2. For each new column, add the corresponding fields to the server’s Playbook and Incident types. This will break some of the tests, so make sure to run make test and update the ones that are failing.
  3. Update the select queries in each of the Playbook and Incident SQL stores so the new columns are retrieved by default.
  4. In the API’s createIncident function, copy the value from the ExportChannelOnArchiveEnabled field from the playbook to the incident.
  5. In the incident service’s UpdateStatus function, when the status is successfully updated to Archived, export the channel. The exported file should be sent to the incident's commander.

Frontend work

  1. Update the webapp’s Playbook type with the new field added to the data model in the server.
  2. Add a new component ExportChannelOnArchive, which should be a simple toggle.
  3. Update the AutomationSettings component to add a new Setting to the section “When an incident is archived” (create the section if it does not exist yet), that includes the new ExportChannelOnArchive. You will need to update the props to receive the new values and functions that the ExportChannelOnArchive component will need.
  4. In the PlaybookEdit component, create the necessary function to handle toggle of the new ExportChannelOnArchive component, and pass that function and the corresponding value to the AutomationSettings component.

Testing

  1. 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.

JIRA: https://mattermost.atlassian.net/browse/MM-32418

Contributor Guide