Commit dcae9312 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Enable resource change event tracking

This sets the feature flag to be enabled by default. Instead of system
notes, event records would be created in the backend.

State, milestone and weight changes will no longer show up in the Notes
API. These can be accessed using their respective resource events APIs.
parent ac510e71
...@@ -108,7 +108,7 @@ module Issuable ...@@ -108,7 +108,7 @@ module Issuable
end end
def milestone_changes_tracking_enabled? def milestone_changes_tracking_enabled?
::Feature.enabled?(:track_resource_milestone_change_events, issuable.project) ::Feature.enabled?(:track_resource_milestone_change_events, issuable.project, default_enabled: true)
end end
def create_due_date_note def create_due_date_note
......
...@@ -341,7 +341,7 @@ module SystemNotes ...@@ -341,7 +341,7 @@ module SystemNotes
def state_change_tracking_enabled? def state_change_tracking_enabled?
noteable.respond_to?(:resource_state_events) && noteable.respond_to?(:resource_state_events) &&
::Feature.enabled?(:track_resource_state_change_events, noteable.project) ::Feature.enabled?(:track_resource_state_change_events, noteable.project, default_enabled: true)
end end
end end
end end
......
---
title: Track milestone and state changes in issues / MRs using resource events
merge_request: 36936
author:
type: changed
...@@ -7,7 +7,19 @@ Notes are comments on: ...@@ -7,7 +7,19 @@ Notes are comments on:
- Merge requests - Merge requests
- Epics **(ULTIMATE)** - Epics **(ULTIMATE)**
This includes system notes, which are notes about changes to the object (for example, when a milestone changes, there will be a corresponding system note). Label notes are not part of this API, but recorded as separate events in [resource label events](resource_label_events.md). This includes system notes, which are notes about changes to the object (for example, when an
assignee changes, there will be a corresponding system note).
## Resource events
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/38096) in GitLab 13.3 for state, milestone, and weight events.
Some system notes are not part of this API, but are recorded as separate events:
- [Resource label events](resource_label_events.md)
- [Resource state events](resource_state_events.md)
- [Resource milestone events](resource_milestone_events.md)
- [Resource weight events](resource_weight_events.md) **(STARTER)**
## Notes pagination ## Notes pagination
......
...@@ -58,7 +58,7 @@ module EE ...@@ -58,7 +58,7 @@ module EE
end end
def weight_changes_tracking_enabled? def weight_changes_tracking_enabled?
!issuable.is_a?(Epic) && ::Feature.enabled?(:track_issue_weight_change_events, issuable.project) !issuable.is_a?(Epic) && ::Feature.enabled?(:track_issue_weight_change_events, issuable.project, default_enabled: true)
end end
end end
end end
......
---
title: Track issue weight changes using resource events
merge_request: 36936
author:
type: changed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment