Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
4ac99e12
Commit
4ac99e12
authored
Nov 05, 2020
by
Eulyeon Ko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused scoped labels feature flag
The scoped labels feature is no longer feature flagged
parent
5bb0a3eb
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
44 additions
and
24 deletions
+44
-24
app/assets/javascripts/issues_list/components/issuable.vue
app/assets/javascripts/issues_list/components/issuable.vue
+4
-6
app/assets/javascripts/issues_list/index.js
app/assets/javascripts/issues_list/index.js
+4
-1
app/controllers/concerns/issuable_actions.rb
app/controllers/concerns/issuable_actions.rb
+0
-3
app/controllers/projects/issues_controller.rb
app/controllers/projects/issues_controller.rb
+0
-4
app/helpers/issues_helper.rb
app/helpers/issues_helper.rb
+5
-0
app/views/groups/issues.html.haml
app/views/groups/issues.html.haml
+2
-1
app/views/projects/issues/_issues.html.haml
app/views/projects/issues/_issues.html.haml
+2
-1
ee/app/controllers/ee/groups_controller.rb
ee/app/controllers/ee/groups_controller.rb
+0
-4
ee/app/helpers/ee/issues_helper.rb
ee/app/helpers/ee/issues_helper.rb
+4
-0
ee/app/views/projects/integrations/jira/issues/index.html.haml
...p/views/projects/integrations/jira/issues/index.html.haml
+2
-1
ee/spec/helpers/ee/issues_helper_spec.rb
ee/spec/helpers/ee/issues_helper_spec.rb
+20
-0
spec/frontend/issues_list/components/issuable_spec.js
spec/frontend/issues_list/components/issuable_spec.js
+1
-3
No files found.
app/assets/javascripts/issues_list/components/issuable.vue
View file @
4ac99e12
...
@@ -28,7 +28,6 @@ import initUserPopovers from '~/user_popovers';
...
@@ -28,7 +28,6 @@ import initUserPopovers from '~/user_popovers';
import
{
mergeUrlParams
}
from
'
~/lib/utils/url_utility
'
;
import
{
mergeUrlParams
}
from
'
~/lib/utils/url_utility
'
;
import
IssueAssignees
from
'
~/vue_shared/components/issue/issue_assignees.vue
'
;
import
IssueAssignees
from
'
~/vue_shared/components/issue/issue_assignees.vue
'
;
import
{
isScopedLabel
}
from
'
~/lib/utils/common_utils
'
;
import
{
isScopedLabel
}
from
'
~/lib/utils/common_utils
'
;
import
glFeatureFlagsMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
import
{
convertToCamelCase
}
from
'
~/lib/utils/text_utility
'
;
import
{
convertToCamelCase
}
from
'
~/lib/utils/text_utility
'
;
...
@@ -37,6 +36,9 @@ export default {
...
@@ -37,6 +36,9 @@ export default {
openedAgo
:
__
(
'
opened %{timeAgoString} by %{user}
'
),
openedAgo
:
__
(
'
opened %{timeAgoString} by %{user}
'
),
openedAgoJira
:
__
(
'
opened %{timeAgoString} by %{user} in Jira
'
),
openedAgoJira
:
__
(
'
opened %{timeAgoString} by %{user} in Jira
'
),
},
},
inject
:
{
scopedLabels
:
[
'
scopedLabels
'
],
},
components
:
{
components
:
{
IssueAssignees
,
IssueAssignees
,
GlLink
,
GlLink
,
...
@@ -50,7 +52,6 @@ export default {
...
@@ -50,7 +52,6 @@ export default {
GlTooltip
,
GlTooltip
,
SafeHtml
,
SafeHtml
,
},
},
mixins
:
[
glFeatureFlagsMixin
()],
props
:
{
props
:
{
issuable
:
{
issuable
:
{
type
:
Object
,
type
:
Object
,
...
@@ -85,9 +86,6 @@ export default {
...
@@ -85,9 +86,6 @@ export default {
return
this
.
issuableLink
({
milestone_title
:
title
});
return
this
.
issuableLink
({
milestone_title
:
title
});
},
},
scopedLabelsAvailable
()
{
return
this
.
glFeatures
.
scopedLabels
;
},
hasWeight
()
{
hasWeight
()
{
return
isNumber
(
this
.
issuable
.
weight
);
return
isNumber
(
this
.
issuable
.
weight
);
},
},
...
@@ -221,7 +219,7 @@ export default {
...
@@ -221,7 +219,7 @@ export default {
return
mergeUrlParams
(
params
,
this
.
baseUrl
);
return
mergeUrlParams
(
params
,
this
.
baseUrl
);
},
},
isScoped
({
name
})
{
isScoped
({
name
})
{
return
isScopedLabel
({
title
:
name
})
&&
this
.
scopedLabels
Available
;
return
isScopedLabel
({
title
:
name
})
&&
this
.
scopedLabels
;
},
},
labelHref
({
name
})
{
labelHref
({
name
})
{
if
(
this
.
isJiraIssue
)
{
if
(
this
.
isJiraIssue
)
{
...
...
app/assets/javascripts/issues_list/index.js
View file @
4ac99e12
...
@@ -41,10 +41,13 @@ function mountIssuablesListApp() {
...
@@ -41,10 +41,13 @@ function mountIssuablesListApp() {
}
}
document
.
querySelectorAll
(
'
.js-issuables-list
'
).
forEach
(
el
=>
{
document
.
querySelectorAll
(
'
.js-issuables-list
'
).
forEach
(
el
=>
{
const
{
canBulkEdit
,
emptyStateMeta
=
{},
...
data
}
=
el
.
dataset
;
const
{
canBulkEdit
,
emptyStateMeta
=
{},
scopedLabels
,
...
data
}
=
el
.
dataset
;
return
new
Vue
({
return
new
Vue
({
el
,
el
,
provide
:
{
scopedLabels
:
parseBoolean
(
scopedLabels
),
},
render
(
createElement
)
{
render
(
createElement
)
{
return
createElement
(
IssuablesListApp
,
{
return
createElement
(
IssuablesListApp
,
{
props
:
{
props
:
{
...
...
app/controllers/concerns/issuable_actions.rb
View file @
4ac99e12
...
@@ -8,9 +8,6 @@ module IssuableActions
...
@@ -8,9 +8,6 @@ module IssuableActions
before_action
:authorize_destroy_issuable!
,
only: :destroy
before_action
:authorize_destroy_issuable!
,
only: :destroy
before_action
:check_destroy_confirmation!
,
only: :destroy
before_action
:check_destroy_confirmation!
,
only: :destroy
before_action
:authorize_admin_issuable!
,
only: :bulk_update
before_action
:authorize_admin_issuable!
,
only: :bulk_update
before_action
only: :show
do
push_frontend_feature_flag
(
:scoped_labels
,
type: :licensed
,
default_enabled:
true
)
end
before_action
do
before_action
do
push_frontend_feature_flag
(
:not_issuable_queries
,
@project
,
default_enabled:
true
)
push_frontend_feature_flag
(
:not_issuable_queries
,
@project
,
default_enabled:
true
)
end
end
...
...
app/controllers/projects/issues_controller.rb
View file @
4ac99e12
...
@@ -57,10 +57,6 @@ class Projects::IssuesController < Projects::ApplicationController
...
@@ -57,10 +57,6 @@ class Projects::IssuesController < Projects::ApplicationController
record_experiment_user
(
:invite_members_version_b
)
record_experiment_user
(
:invite_members_version_b
)
end
end
before_action
only: :index
do
push_frontend_feature_flag
(
:scoped_labels
,
@project
,
type: :licensed
)
end
around_action
:allow_gitaly_ref_name_caching
,
only:
[
:discussions
]
around_action
:allow_gitaly_ref_name_caching
,
only:
[
:discussions
]
respond_to
:html
respond_to
:html
...
...
app/helpers/issues_helper.rb
View file @
4ac99e12
...
@@ -170,6 +170,11 @@ module IssuesHelper
...
@@ -170,6 +170,11 @@ module IssuesHelper
submit_as_spam_path:
mark_as_spam_project_issue_path
(
project
,
issuable
)
submit_as_spam_path:
mark_as_spam_project_issue_path
(
project
,
issuable
)
}
}
end
end
# Overridden in EE
def
scoped_labels_available?
(
project
)
false
end
end
end
IssuesHelper
.
prepend_if_ee
(
'EE::IssuesHelper'
)
IssuesHelper
.
prepend_if_ee
(
'EE::IssuesHelper'
)
app/views/groups/issues.html.haml
View file @
4ac99e12
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
'can-bulk-edit'
:
@can_bulk_update
.
to_json
,
'can-bulk-edit'
:
@can_bulk_update
.
to_json
,
'empty-state-meta'
:
{
svg_path:
image_path
(
'illustrations/issues.svg'
)
},
'empty-state-meta'
:
{
svg_path:
image_path
(
'illustrations/issues.svg'
)
},
'sort-key'
:
@sort
,
'sort-key'
:
@sort
,
type:
'issues'
}
}
type:
'issues'
,
'scoped-labels'
:
@group
.
feature_available?
(
:scoped_labels
).
to_json
}
}
-
else
-
else
=
render
'shared/issues'
=
render
'shared/issues'
app/views/projects/issues/_issues.html.haml
View file @
4ac99e12
...
@@ -11,7 +11,8 @@
...
@@ -11,7 +11,8 @@
'empty-state-meta'
:
data_empty_state_meta
.
to_json
,
'empty-state-meta'
:
data_empty_state_meta
.
to_json
,
'can-bulk-edit'
:
@can_bulk_update
.
to_json
,
'can-bulk-edit'
:
@can_bulk_update
.
to_json
,
'sort-key'
:
@sort
,
'sort-key'
:
@sort
,
type:
type
}
}
type:
type
,
'scoped-labels'
:
scoped_labels_available?
(
@project
).
to_json
}
}
-
else
-
else
-
empty_state_path
=
local_assigns
.
fetch
(
:empty_state_path
,
'shared/empty_states/issues'
)
-
empty_state_path
=
local_assigns
.
fetch
(
:empty_state_path
,
'shared/empty_states/issues'
)
%ul
.content-list.issues-list.issuable-list
{
class:
(
"manual-ordering"
if
@sort
==
'relative_position'
)
}
%ul
.content-list.issues-list.issuable-list
{
class:
(
"manual-ordering"
if
@sort
==
'relative_position'
)
}
...
...
ee/app/controllers/ee/groups_controller.rb
View file @
4ac99e12
...
@@ -11,10 +11,6 @@ module EE
...
@@ -11,10 +11,6 @@ module EE
before_action
:ee_authorize_admin_group!
,
only:
[
:restore
]
before_action
:ee_authorize_admin_group!
,
only:
[
:restore
]
before_action
only: :issues
do
push_frontend_feature_flag
(
:scoped_labels
,
@group
,
type: :licensed
)
end
feature_category
:subgroups
,
[
:restore
]
feature_category
:subgroups
,
[
:restore
]
end
end
...
...
ee/app/helpers/ee/issues_helper.rb
View file @
4ac99e12
...
@@ -54,5 +54,9 @@ module EE
...
@@ -54,5 +54,9 @@ module EE
def
show_timeline_view_toggle?
(
issue
)
def
show_timeline_view_toggle?
(
issue
)
issue
.
incident?
&&
issue
.
project
.
feature_available?
(
:incident_timeline_view
)
issue
.
incident?
&&
issue
.
project
.
feature_available?
(
:incident_timeline_view
)
end
end
def
scoped_labels_available?
(
project
)
project
.
feature_available?
(
:scoped_labels
)
end
end
end
end
end
ee/app/views/projects/integrations/jira/issues/index.html.haml
View file @
4ac99e12
...
@@ -19,4 +19,5 @@
...
@@ -19,4 +19,5 @@
'empty-state-meta'
:
{
svg_path:
image_path
(
'illustrations/issues.svg'
)
},
'empty-state-meta'
:
{
svg_path:
image_path
(
'illustrations/issues.svg'
)
},
'sort-key'
:
@sort
,
'sort-key'
:
@sort
,
type:
'jira'
,
type:
'jira'
,
project_path:
@project
.
full_path
,
}
}
'project-path'
:
@project
.
full_path
,
'scoped-labels'
:
scoped_labels_available?
(
@project
).
to_json
}
}
ee/spec/helpers/ee/issues_helper_spec.rb
View file @
4ac99e12
...
@@ -89,4 +89,24 @@ RSpec.describe EE::IssuesHelper do
...
@@ -89,4 +89,24 @@ RSpec.describe EE::IssuesHelper do
end
end
end
end
end
end
describe
'#scoped_labels_available?'
do
subject
{
helper
.
scoped_labels_available?
(
project
)
}
context
'without license'
do
before
do
stub_licensed_features
(
scoped_labels:
false
)
end
it
{
is_expected
.
to
be_falsy
}
end
context
'with license'
do
before
do
stub_licensed_features
(
scoped_labels:
true
)
end
it
{
is_expected
.
to
be_truthy
}
end
end
end
end
spec/frontend/issues_list/components/issuable_spec.js
View file @
4ac99e12
...
@@ -46,10 +46,8 @@ describe('Issuable component', () => {
...
@@ -46,10 +46,8 @@ describe('Issuable component', () => {
...
props
,
...
props
,
},
},
provide
:
{
provide
:
{
glFeatures
:
{
scopedLabels
,
scopedLabels
,
},
},
},
stubs
:
{
stubs
:
{
'
gl-sprintf
'
:
GlSprintf
,
'
gl-sprintf
'
:
GlSprintf
,
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment