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
34d050f6
Commit
34d050f6
authored
Aug 24, 2017
by
Felipe Artur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code improvements
parent
d700c6f0
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
19 additions
and
24 deletions
+19
-24
app/models/board.rb
app/models/board.rb
+0
-1
app/models/concerns/relative_positioning.rb
app/models/concerns/relative_positioning.rb
+1
-1
app/views/shared/boards/_switcher.html.haml
app/views/shared/boards/_switcher.html.haml
+1
-1
app/views/shared/boards/components/sidebar/_milestone.html.haml
...ews/shared/boards/components/sidebar/_milestone.html.haml
+1
-1
doc/user/group/issue_boards.md
doc/user/group/issue_boards.md
+2
-2
ee/app/controllers/ee/boards/issues_controller.rb
ee/app/controllers/ee/boards/issues_controller.rb
+4
-6
ee/app/controllers/ee/boards_responses.rb
ee/app/controllers/ee/boards_responses.rb
+2
-2
ee/app/helpers/ee/boards_helper.rb
ee/app/helpers/ee/boards_helper.rb
+2
-2
ee/app/models/concerns/ee/relative_positioning.rb
ee/app/models/concerns/ee/relative_positioning.rb
+3
-5
ee/app/models/ee/board.rb
ee/app/models/ee/board.rb
+1
-1
ee/app/services/ee/boards/lists/create_service.rb
ee/app/services/ee/boards/lists/create_service.rb
+1
-1
ee/app/services/ee/boards/move_service.rb
ee/app/services/ee/boards/move_service.rb
+1
-1
No files found.
app/models/board.rb
View file @
34d050f6
...
...
@@ -7,7 +7,6 @@ class Board < ActiveRecord::Base
validates
:name
,
presence:
true
# if block needed only for EE which has group boards feature
validates
:project
,
presence:
true
,
if:
->
{
respond_to?
(
:group_id
)
&&
!
group
}
def
backlog_list
...
...
app/models/concerns/relative_positioning.rb
View file @
34d050f6
...
...
@@ -11,7 +11,7 @@ module RelativePositioning
end
def
project_ids
project
.
id
[
project
.
id
]
end
def
max_relative_position
...
...
app/views/shared/boards/_switcher.html.haml
View file @
34d050f6
-
parent
=
board
.
parent
-
milestone_filter_opts
=
{
format: :json
}
-
milestone_filter_opts
=
milestone_filter_opts
.
merge
(
only_group_milestones:
true
)
if
board
.
is_
group_board?
-
milestone_filter_opts
=
milestone_filter_opts
.
merge
(
only_group_milestones:
true
)
if
board
.
group_board?
%boards-selector
{
"inline-template"
=>
true
,
":current-board"
=>
current_board_json
,
...
...
app/views/shared/boards/components/sidebar/_milestone.html.haml
View file @
34d050f6
-
milestone_filter_opts
=
{
format: :json
}
-
milestone_filter_opts
=
milestone_filter_opts
.
merge
(
only_group_milestones:
true
)
if
board
.
is_
group_board?
-
milestone_filter_opts
=
milestone_filter_opts
.
merge
(
only_group_milestones:
true
)
if
board
.
group_board?
.block.milestone
.title
...
...
doc/user/group/issue_boards.md
View file @
34d050f6
# Group issue board
> Introduced in GitLab
9.5
.
> Introduced in GitLab
10.0
.
Group issue boards help users manage teams in organizations
that have a team-centered or product-centered approach which spans
...
...
@@ -8,7 +8,7 @@ many projects.
![
Group Issue Board
](
img/group_issue_board.png
)
The design and functionality are the same
of
[
project boards
](
../project/issue_board.md
)
with some small differences:
The design and functionality are the same
as
[
project boards
](
../project/issue_board.md
)
with some small differences:
*
In a group board all issues within group projects will be displayed
on backlog or closed lists. Users don't need to filter them by project on search bar.
...
...
ee/app/controllers/ee/boards/issues_controller.rb
View file @
34d050f6
...
...
@@ -2,15 +2,13 @@ module EE
module
Boards
module
IssuesController
def
issues_finder
if
board
.
is_group_board?
IssuesFinder
.
new
(
current_user
,
group_id:
board_parent
.
id
)
else
super
end
return
super
unless
board
.
group_board?
IssuesFinder
.
new
(
current_user
,
group_id:
board_parent
.
id
)
end
def
project
@project
||=
board
.
is_
group_board?
?
super
:
board
.
parent
@project
||=
board
.
group_board?
?
super
:
board
.
parent
end
end
end
...
...
ee/app/controllers/ee/boards_responses.rb
View file @
34d050f6
...
...
@@ -3,13 +3,13 @@ module EE
# Shared authorizations between projects and groups which
# have different policies on EE.
def
authorize_read_list
ability
=
board
.
is_
group_board?
?
:read_group
:
:read_list
ability
=
board
.
group_board?
?
:read_group
:
:read_list
authorize_action_for!
(
board
.
parent
,
ability
)
end
def
authorize_read_issue
ability
=
board
.
is_
group_board?
?
:read_group
:
:read_issue
ability
=
board
.
group_board?
?
:read_group
:
:read_issue
authorize_action_for!
(
board
.
parent
,
ability
)
end
...
...
ee/app/helpers/ee/boards_helper.rb
View file @
34d050f6
...
...
@@ -6,7 +6,7 @@ module EE
end
def
build_issue_link_base
return
super
unless
@board
.
is_
group_board?
return
super
unless
@board
.
group_board?
"/
#{
@board
.
group
.
path
}
/:project_path/issues"
end
...
...
@@ -17,7 +17,7 @@ module EE
def
board_path
(
board
)
@board_path
||=
begin
if
board
.
is_
group_board?
if
board
.
group_board?
group_board_path
(
current_board_parent
,
board
)
else
super
(
board
)
...
...
ee/app/models/concerns/ee/relative_positioning.rb
View file @
34d050f6
...
...
@@ -12,11 +12,9 @@ module EE
end
def
project_ids
if
has_group_boards?
board_group
.
projects
.
pluck
(
:id
)
else
super
end
return
super
unless
has_group_boards?
board_group
.
projects
.
select
(
:id
)
end
end
end
ee/app/models/ee/board.rb
View file @
34d050f6
...
...
@@ -23,7 +23,7 @@ module EE
@parent
||=
group
||
project
end
def
is_
group_board?
def
group_board?
group_id
.
present?
end
...
...
ee/app/services/ee/boards/lists/create_service.rb
View file @
34d050f6
...
...
@@ -3,7 +3,7 @@ module EE
module
Lists
module
CreateService
def
available_labels_for
(
board
)
if
board
.
is_
group_board?
if
board
.
group_board?
parent
.
labels
else
super
...
...
ee/app/services/ee/boards/move_service.rb
View file @
34d050f6
...
...
@@ -5,7 +5,7 @@ module EE
label_ids
=
if
moving_to_list
.
movable?
moving_from_list
.
label_id
elsif
board
.
is_
group_board?
elsif
board
.
group_board?
::
Label
.
on_group_boards
(
parent
.
id
).
pluck
(
:label_id
)
else
::
Label
.
on_project_boards
(
parent
.
id
).
pluck
(
:label_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