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
29b90ce8
Commit
29b90ce8
authored
Sep 22, 2017
by
Oswaldo Ferreira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename feature from "issue_board_milestone" to "scoped_issue_board"
parent
2e19d8ff
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
20 additions
and
20 deletions
+20
-20
app/models/license.rb
app/models/license.rb
+1
-1
app/models/namespace.rb
app/models/namespace.rb
+2
-2
app/models/project.rb
app/models/project.rb
+2
-2
app/services/boards/update_service.rb
app/services/boards/update_service.rb
+1
-1
app/views/shared/boards/_switcher.html.haml
app/views/shared/boards/_switcher.html.haml
+1
-1
app/views/shared/boards/components/_form.html.haml
app/views/shared/boards/components/_form.html.haml
+1
-1
ee/app/helpers/ee/boards_helper.rb
ee/app/helpers/ee/boards_helper.rb
+1
-1
ee/app/views/shared/promotions/_promote_issue_board.html.haml
...pp/views/shared/promotions/_promote_issue_board.html.haml
+1
-1
lib/api/entities.rb
lib/api/entities.rb
+1
-1
spec/features/boards/board_with_milestone_spec.rb
spec/features/boards/board_with_milestone_spec.rb
+2
-2
spec/requests/api/boards_spec.rb
spec/requests/api/boards_spec.rb
+5
-5
spec/services/boards/update_service_spec.rb
spec/services/boards/update_service_spec.rb
+2
-2
No files found.
app/models/license.rb
View file @
29b90ce8
...
...
@@ -16,7 +16,7 @@ class License < ActiveRecord::Base
group_webhooks
issuable_default_templates
issue_board_focus_mode
issue_board_milestone
scoped_issue_board
issue_weights
jenkins_integration
ldap_extras
...
...
app/models/namespace.rb
View file @
29b90ce8
...
...
@@ -218,8 +218,8 @@ class Namespace < ActiveRecord::Base
feature_available?
(
:multiple_issue_boards
)
end
def
issue_board_milestone
_available?
(
user
=
nil
)
feature_available?
(
:
issue_board_milestone
)
def
scoped_issue_board
_available?
(
user
=
nil
)
feature_available?
(
:
scoped_issue_board
)
end
private
...
...
app/models/project.rb
View file @
29b90ce8
...
...
@@ -1532,8 +1532,8 @@ class Project < ActiveRecord::Base
feature_available?
(
:multiple_issue_boards
,
user
)
end
def
issue_board_milestone
_available?
(
user
=
nil
)
feature_available?
(
:
issue_board_milestone
,
user
)
def
scoped_issue_board
_available?
(
user
=
nil
)
feature_available?
(
:
scoped_issue_board
,
user
)
end
def
full_path_was
...
...
app/services/boards/update_service.rb
View file @
29b90ce8
module
Boards
class
UpdateService
<
Boards
::
BaseService
def
execute
(
board
)
params
.
delete
(
:milestone_id
)
unless
parent
.
feature_available?
(
:
issue_board_milestone
)
params
.
delete
(
:milestone_id
)
unless
parent
.
feature_available?
(
:
scoped_issue_board
)
board
.
update
(
params
)
end
...
...
app/views/shared/boards/_switcher.html.haml
View file @
29b90ce8
...
...
@@ -57,7 +57,7 @@
%li
%a
{
"href"
=>
"#"
,
"@click.stop.prevent"
=>
"showPage('edit')"
}
Edit board name
-
if
parent
.
issue_board_milestone
_available?
(
current_user
)
-
if
parent
.
scoped_issue_board
_available?
(
current_user
)
%li
%a
{
"href"
=>
"#"
,
"@click.stop.prevent"
=>
"showPage('milestone')"
}
Edit board milestone
...
...
app/views/shared/boards/components/_form.html.haml
View file @
29b90ce8
...
...
@@ -10,7 +10,7 @@
%input
.form-control
{
type:
"text"
,
id:
"board-new-name"
,
"v-model"
=>
"board.name"
}
-
if
current_board_parent
.
issue_board_milestone
_available?
(
current_user
)
-
if
current_board_parent
.
scoped_issue_board
_available?
(
current_user
)
.dropdown.board-inner-milestone-dropdown
{
":class"
=>
"{ open: milestoneDropdownOpen }"
,
"v-if"
=>
"currentPage === 'new'"
}
%label
.label-light
{
for:
"board-milestone"
}
...
...
ee/app/helpers/ee/boards_helper.rb
View file @
29b90ce8
...
...
@@ -8,7 +8,7 @@ module EE
data
=
{
board_milestone_title:
board
&
.
milestone
&
.
title
,
focus_mode_available:
parent
.
feature_available?
(
:issue_board_focus_mode
).
to_s
,
show_promotion:
(
@project
&&
show_promotions?
&&
(
!
@project
.
feature_available?
(
:multiple_issue_boards
)
||
!
@project
.
feature_available?
(
:
issue_board_milestone
)
||
!
@project
.
feature_available?
(
:issue_board_focus_mode
))).
to_s
show_promotion:
(
@project
&&
show_promotions?
&&
(
!
@project
.
feature_available?
(
:multiple_issue_boards
)
||
!
@project
.
feature_available?
(
:
scoped_issue_board
)
||
!
@project
.
feature_available?
(
:issue_board_focus_mode
))).
to_s
}
...
...
ee/app/views/shared/promotions/_promote_issue_board.html.haml
View file @
29b90ce8
...
...
@@ -12,7 +12,7 @@
-
unless
@project
.
feature_available?
(
:multiple_issue_boards
)
%li
=
link_to
_
(
'Multiple issue boards'
),
help_page_path
(
'user/project/issue_board.html'
,
anchor
:'use-cases-for-multiple-issue-boards'
),
target:
'_blank'
-
unless
@project
.
feature_available?
(
:
issue_board_milestone
)
-
unless
@project
.
feature_available?
(
:
scoped_issue_board
)
%li
=
link_to
_
(
'Issue boards with milestones'
),
help_page_path
(
'user/project/issue_board.html'
,
anchor
:'board-with-a-milestone'
),
target:
'_blank'
-
unless
@project
.
feature_available?
(
:issue_board_focus_mode
)
...
...
lib/api/entities.rb
View file @
29b90ce8
...
...
@@ -796,7 +796,7 @@ module API
expose
:name
expose
:project
,
using:
Entities
::
BasicProjectDetails
expose
:milestone
,
if:
->
(
board
,
_
)
{
board
.
project
.
feature_available?
(
:
issue_board_milestone
)
}
if:
->
(
board
,
_
)
{
board
.
project
.
feature_available?
(
:
scoped_issue_board
)
}
expose
:lists
,
using:
Entities
::
List
do
|
board
|
board
.
lists
.
destroyable
end
...
...
spec/features/boards/board_with_milestone_spec.rb
View file @
29b90ce8
...
...
@@ -17,7 +17,7 @@ describe 'Board with milestone', :js do
context
'with the feature enabled'
do
before
do
stub_licensed_features
(
issue_board_milestone
:
true
)
stub_licensed_features
(
scoped_issue_board
:
true
)
end
context
'new board'
do
...
...
@@ -173,7 +173,7 @@ describe 'Board with milestone', :js do
context
'with the feature disabled'
do
before
do
stub_licensed_features
(
issue_board_milestone
:
false
)
stub_licensed_features
(
scoped_issue_board
:
false
)
visit
project_boards_path
(
project
)
end
...
...
spec/requests/api/boards_spec.rb
View file @
29b90ce8
...
...
@@ -60,17 +60,17 @@ describe API::Boards do
end
end
context
'with the
issue_board_milestone
-feature available'
do
it
'returns the milestone when the `
issue_board_milestone
`-feature is enabled'
do
stub_licensed_features
(
issue_board_milestone
:
true
)
context
'with the
scoped_issue_board
-feature available'
do
it
'returns the milestone when the `
scoped_issue_board
`-feature is enabled'
do
stub_licensed_features
(
scoped_issue_board
:
true
)
get
api
(
base_url
,
user
)
expect
(
json_response
.
first
[
"milestone"
]).
not_to
be_nil
end
it
'hides the milestone when the `
issue_board_milestone
`-feature is disabled'
do
stub_licensed_features
(
issue_board_milestone
:
false
)
it
'hides the milestone when the `
scoped_issue_board
`-feature is disabled'
do
stub_licensed_features
(
scoped_issue_board
:
false
)
get
api
(
base_url
,
user
)
...
...
spec/services/boards/update_service_spec.rb
View file @
29b90ce8
...
...
@@ -26,7 +26,7 @@ describe Boards::UpdateService do
end
it
'udpates the milestone with issue board milestones enabled'
do
stub_licensed_features
(
issue_board_milestone
:
true
)
stub_licensed_features
(
scoped_issue_board
:
true
)
milestone
=
create
(
:milestone
,
project:
project
)
service
=
described_class
.
new
(
project
,
double
,
milestone_id:
milestone
.
id
)
...
...
@@ -36,7 +36,7 @@ describe Boards::UpdateService do
end
it
'udpates the milestone with the issue board milestones feature enabled'
do
stub_licensed_features
(
issue_board_milestone
:
false
)
stub_licensed_features
(
scoped_issue_board
:
false
)
milestone
=
create
(
:milestone
,
project:
project
)
service
=
described_class
.
new
(
project
,
double
,
milestone_id:
milestone
.
id
)
...
...
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