Commit ddd704ae authored by Jarka Košanová's avatar Jarka Košanová

Enable Epic relationships

- remove epic_links feature flag
- add documentation & changelog
parent 33501c1f
......@@ -23,6 +23,10 @@ you can change its title, description, start date, and due date.
![epic view](img/epic_view.png)
## Relationship in Epics
### With Issues
An epic contains a list of issues, and an issue can be associated with at most
one epic. You can add issues associated with the epic by clicking the
plus icon (<kbd>+</kbd>) under the epic description, pasting the link of the
......@@ -31,9 +35,19 @@ group or any of the epic's subgroups are eligible to be added. To remove an
issue from an epic, simply click on the <kbd>x</kbd> button in the epic's
issue list.
When you add an issue to an epic that's already associated with another epic,
the issue is automatically removed from the previous epic. In other words, an
issue can be associated with at most one epic.
### With Epics
An epic can have multiple child epics while the maximum depth is 5. You can add epics associated with the epic by clicking the
plus icon (<kbd>+</kbd>) under the epic description, pasting the link of the
issue, and clicking **Add**. Any epic belonging to a group or subgroup of the epic's
group are eligible to be added. To remove a child epic from a parent epic,
simply click on the <kbd>x</kbd> button in the epic's epic list.
### Conflicts
When you add an issue or an epic to an epic that's already associated with another epic,
the issue or the epic is automatically removed from the previous epic. In other words, an
issue or epic can be associated with at most one epic.
## Start date and due date
......
......@@ -213,7 +213,7 @@ export default {
return {
// Epics specific configuration
issuableRef: '',
hasRelatedEpicsFeature: this.subepicsSupported && gon.features && gon.features.epicLinks,
hasRelatedEpicsFeature: this.subepicsSupported,
projectPath: this.groupPath,
parentEpic: this.parent ? this.parent : {},
projectNamespace: '',
......
......@@ -3,13 +3,8 @@
class Groups::EpicLinksController < Groups::EpicsController
include EpicRelations
before_action :check_feature_flag!
before_action :check_nested_support!
before_action do
push_frontend_feature_flag(:epic_links)
end
def destroy
result = ::Epics::UpdateService.new(group, current_user, { parent: nil }).execute(child_epic)
......@@ -30,10 +25,6 @@ class Groups::EpicLinksController < Groups::EpicsController
@child_epic ||= Epic.find(params[:id])
end
def check_feature_flag!
render_404 unless Feature.enabled?(:epic_links, group)
end
def check_nested_support!
render_404 unless Epic.supports_nested_objects?
end
......
......@@ -8,10 +8,6 @@ class Groups::EpicsController < Groups::ApplicationController
include RendersNotes
include EpicsActions
before_action do
push_frontend_feature_flag(:epic_links)
end
before_action :check_epics_available!
before_action :epic, except: [:index, :create]
before_action :set_issuables_index, only: :index
......
---
title: Add support for relationship between epics
merge_request: 9051
author:
type: added
......@@ -26,20 +26,6 @@ describe Groups::EpicLinksController, :postgresql do
end
end
shared_examples 'feature flag disabled' do
before do
stub_licensed_features(epics: true)
stub_feature_flags(epic_links: false)
group.add_developer(user)
subject
end
it 'returns 400 status' do
expect(response).to have_gitlab_http_status(404)
end
end
describe 'GET #index' do
before do
epic1.update(parent: parent_epic)
......@@ -48,12 +34,10 @@ describe Groups::EpicLinksController, :postgresql do
subject { get :index, group_id: group, epic_id: parent_epic.to_param }
it_behaves_like 'unlicensed epics action'
it_behaves_like 'feature flag disabled'
context 'when epic_links feature is enabled' do
context 'when epics are enabled' do
before do
stub_licensed_features(epics: true)
stub_feature_flags(epic_linkcs: true)
group.add_developer(user)
subject
......@@ -76,12 +60,10 @@ describe Groups::EpicLinksController, :postgresql do
end
it_behaves_like 'unlicensed epics action'
it_behaves_like 'feature flag disabled'
context 'when epic_links feature is enabled' do
context 'when epics are enabled' do
before do
stub_licensed_features(epics: true)
stub_feature_flags(epic_linkcs: true)
end
context 'when user has permissions to create requested association' do
......@@ -124,12 +106,10 @@ describe Groups::EpicLinksController, :postgresql do
subject { delete :destroy, group_id: group, epic_id: parent_epic.to_param, id: epic1.id }
it_behaves_like 'unlicensed epics action'
it_behaves_like 'feature flag disabled'
context 'when epic_links feature is enabled' do
context 'when epics are enabled' do
before do
stub_licensed_features(epics: true)
stub_feature_flags(epic_linkcs: true)
end
context 'when user has permissions to update the parent epic' do
......
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