Prepare for tracking label add/remove events for issues/mrs/epics
Background
Description
-
Prepare backend to track label changes explicitly in the system, as events
-
Don't enable events creation yet, this will be enabled as part of #48483 (closed)) and switching system notes to events will be easier (see https://gitlab.com/gitlab-org/gitlab-ce/issues/47993#note_90719804)
-
Applies to project labels and group labels.
-
Applies to issues and merge requests and epics.
-
In each event, track the following:
- Who made the change.
- The label (a project label or a group label).
- The associated object, i.e. the issue, mr, or the epic.
- The timestamp.
-
This is for any new events.
-
Previous changes will not be considered. (I.e. we don't need to try to reconstruct previous changes and migrate them to the db.)
Use cases this should support
- This will be used to support a new way to present system notes. These are tracked in these separate issues.
- This will be used to support future improvements to email notifications, and possibly todos.
- It should handle label promotions gracefully.
- It should handle issues being moved gracefully.
- It should handle projects being deleted gracefully.
- This will be used to support doing VSM, i.e. https://gitlab.com/gitlab-org/gitlab-ee/issues/6323. In particular, see this discussion on label promotions and VSM: https://gitlab.com/gitlab-org/gitlab-ce/issues/47993#note_82944694.
Edited by Jan Provaznik