Skip to content

Add model for tracking published issues

Sarah Yasonik requested to merge sy-publish-status into master

What does this MR do?

Adds a DB (join) table which represents when an issues is published to an external status page instance. Currently, if a status page app is configured for a project, all non-confidential issues will be published automatically. With an ability to track when an issue is published, issues can be published on an as-needed basis at the discretion of the user.

How table is intended to be utilized:

  • When an issue is published, a StatusPage::PublishedIncident is created.
  • When an issue is unpublished, the corresponding StatusPage::PublishedIncident is deleted.
  • Already-published issues will have the StatusPage::PublishedIncident table back-filled with the date the status page was configured.

Changelog isn't in EE as the migration affects CE as well.

MRs for full feature:

  • !29994 (merged) - Adds status_page_published_incidents table
  • !30120 (closed) - Saves records to table when issues are published/unpublished
  • TBD - Disable auto-publishing issues & Add /publish command

Migration logs:

$ rake db:migrate
== 20200416005331 CreateStatusPagePublishedIncidents: migrating ===============
-- create_table(:status_page_published_incidents)
   -> 0.0560s
== 20200416005331 CreateStatusPagePublishedIncidents: migrated (0.0560s) ======

$ rake db:migrate:down VERSION=20200416005331
== 20200416005331 CreateStatusPagePublishedIncidents: reverting ==================
-- drop_table(:status_page_published_incidents)
   -> 0.0192s
== 20200416005331 CreateStatusPagePublishedIncidents: reverted (0.0231s) =========

Related issue: #209849 (closed)

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Sarah Yasonik

Merge request reports