Commit afee5539 authored by Sean McGivern's avatar Sean McGivern

Merge branch '8915-remove-epics-ff' into 'master'

Remove epic_links feature flag and add documentation

Closes #8915 and #8894

See merge request gitlab-org/gitlab-ee!9051
parents 47b49f8f 1474b408
......@@ -23,17 +23,38 @@ you can change its title, description, start date, and due date.
![epic view](img/epic_view.png)
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
issue, and clicking **Add**. Any issue belonging to a project in the epic's
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.
## Adding an issue to an epic
An epic contains a list of issues and an issue can be associated with at most
one epic. When on an epic, you can add its associated issues:
1. Click the plus icon (<kbd>+</kbd>) under the epic description.
1. Paste the link of the issue (you can hit <kbd>Spacebar</kbd> to add more than
one issues at a time).
1. Click **Add**.
Any issue belonging to a project in the epic's group or any of the epic's
subgroups are eligible to be added. To remove an issue from an epic, click
on the <kbd>x</kbd> button in the epic's issue list.
NOTE: **Note:**
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.
## Child epics
> [Introduced](https://gitlab.com/gitlab-org/gitlab-ee/issues/8333) in GitLab Ultimate 11.7.
Much like adding issues to an epic, an epic can have multiple child epics with
the maximum depth being 5. To add a child epic:
1. Click the plus icon (<kbd>+</kbd>) under the epic description.
1. Paste the link of the epic.
1. Click **Add**.
Any epic that belongs to a group or subgroup of the parent epic's group is
eligible to be added. To remove a child epic from a parent epic,
click on the <kbd>x</kbd> button in the parent epic's epic list.
## Start date and due date
......@@ -49,7 +70,7 @@ for the due date, GitLab will set it to be the latest due date across all
milestones that are currently assigned to those issues.
These are dynamic dates in that if milestones are re-assigned to the issues, if the
milestone dates change, or if issues are added or removed from the epic, then the
milestone dates change, or if issues are added or removed from the epic, then
the re-calculation will happen immediately to set a new dynamic date.
## Reordering issues in an epic
......
......@@ -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, params: { 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, params: { 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