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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
9946d081
Commit
9946d081
authored
Mar 05, 2018
by
Felipe Artur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address review comments
parent
dd071c4b
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
31 additions
and
47 deletions
+31
-47
app/controllers/boards/issues_controller.rb
app/controllers/boards/issues_controller.rb
+6
-7
app/helpers/boards_helper.rb
app/helpers/boards_helper.rb
+5
-7
app/helpers/groups_helper.rb
app/helpers/groups_helper.rb
+1
-1
changelogs/unreleased/issue_38337.yml
changelogs/unreleased/issue_38337.yml
+1
-1
config/routes/group.rb
config/routes/group.rb
+0
-8
config/routes/project.rb
config/routes/project.rb
+1
-1
db/migrate/20180227182112_add_group_id_to_boards.rb
db/migrate/20180227182112_add_group_id_to_boards.rb
+14
-19
doc/user/project/issue_board.md
doc/user/project/issue_board.md
+2
-2
lib/api/group_boards.rb
lib/api/group_boards.rb
+1
-1
No files found.
app/controllers/boards/issues_controller.rb
View file @
9946d081
...
...
@@ -9,6 +9,7 @@ module Boards
before_action
:authorize_read_issue
,
only:
[
:index
]
before_action
:authorize_create_issue
,
only:
[
:create
]
before_action
:authorize_update_issue
,
only:
[
:update
]
skip_before_action
:authenticate_user!
,
only:
[
:index
]
def
index
issues
=
Boards
::
Issues
::
ListService
.
new
(
board_parent
,
current_user
,
filter_params
).
execute
...
...
@@ -74,13 +75,11 @@ module Boards
end
def
project
@project
||=
begin
if
board
.
group_board?
Project
.
find
(
issue_params
[
:project_id
])
else
board_parent
end
end
@project
||=
if
board
.
group_board?
Project
.
find
(
issue_params
[
:project_id
])
else
board_parent
end
end
def
move_params
...
...
app/helpers/boards_helper.rb
View file @
9946d081
...
...
@@ -37,13 +37,11 @@ module BoardsHelper
end
def
current_board_path
(
board
)
@current_board_path
||=
begin
if
board
.
group_board?
group_board_path
(
current_board_parent
,
board
)
else
project_board_path
(
current_board_parent
,
board
)
end
end
@current_board_path
||=
if
board
.
group_board?
group_board_path
(
current_board_parent
,
board
)
else
project_board_path
(
current_board_parent
,
board
)
end
end
def
current_board_parent
...
...
app/helpers/groups_helper.rb
View file @
9946d081
...
...
@@ -129,7 +129,7 @@ module GroupsHelper
links
=
[
:overview
,
:group_members
]
if
can?
(
current_user
,
:read_cross_project
)
links
+=
[
:activity
,
:issues
,
:
labels
,
:milestones
,
:merge_requests
,
:board
s
]
links
+=
[
:activity
,
:issues
,
:
boards
,
:labels
,
:milestones
,
:merge_request
s
]
end
if
can?
(
current_user
,
:admin_group
,
@group
)
...
...
changelogs/unreleased/issue_38337.yml
View file @
9946d081
---
title
:
Add one group
port to CE
title
:
Add one group
board to Libre
merge_request
:
author
:
type
:
added
config/routes/group.rb
View file @
9946d081
...
...
@@ -59,14 +59,6 @@ constraints(GroupUrlConstrainer.new) do
# On CE only index and show actions are needed
resources
:boards
,
only:
[
:index
,
:show
]
legacy_ee_group_boards_redirect
=
redirect
do
|
params
,
request
|
path
=
"/groups/
#{
params
[
:group_id
]
}
/-/boards"
path
<<
"/
#{
params
[
:extra_params
]
}
"
if
params
[
:extra_params
].
present?
path
<<
"?
#{
request
.
query_string
}
"
if
request
.
query_string
.
present?
path
end
get
'boards(/*extra_params)'
,
as: :legacy_ee_group_boards_redirect
,
to:
legacy_ee_group_boards_redirect
end
scope
(
path:
'*id'
,
...
...
config/routes/project.rb
View file @
9946d081
...
...
@@ -381,7 +381,7 @@ constraints(ProjectUrlConstrainer.new) do
get
'noteable/:target_type/:target_id/notes'
=>
'notes#index'
,
as:
'noteable_notes'
resources
:boards
,
only:
[
:index
,
:show
,
:create
,
:update
,
:destroy
]
resources
:boards
,
only:
[
:index
,
:show
]
resources
:todos
,
only:
[
:create
]
...
...
db/migrate/20180227182112_add_group_id_to_boards.rb
View file @
9946d081
# This is part of a backport from EE group boards feature which a few extra steps
# are required on this migration since it will be merged into EE which already
# contains the group_id column.
# like checking if the group_id column already exists before adding it.
class
AddGroupIdToBoards
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
...
...
@@ -11,24 +6,24 @@ class AddGroupIdToBoards < ActiveRecord::Migration
DOWNTIME
=
false
def
up
unless
group_id_exists?
add_column
:boards
,
:group_id
,
:integer
add_foreign_key
:boards
,
:namespaces
,
column: :group_id
,
on_delete: :cascade
add_concurrent_index
:boards
,
:group_id
return
if
group_id_exists?
add_column
:boards
,
:group_id
,
:integer
add_foreign_key
:boards
,
:namespaces
,
column: :group_id
,
on_delete: :cascade
add_concurrent_index
:boards
,
:group_id
change_column_null
:boards
,
:project_id
,
true
end
change_column_null
:boards
,
:project_id
,
true
end
def
down
if
group_id_exists?
remove_foreign_key
:boards
,
column: :group_id
remove_index
:boards
,
:group_id
if
index_exists?
:boards
,
:group_id
remove_column
:boards
,
:group_id
execute
"DELETE from boards WHERE project_id IS NULL"
change_column_null
:boards
,
:project_id
,
false
end
return
unless
group_id_exists?
remove_foreign_key
:boards
,
column:
:group_id
remove_index
:boards
,
:group_id
if
index_exists?
:boards
,
:group_id
remove_column
:boards
,
:group_id
execute
"DELETE from boards WHERE project_id IS NULL"
change_column_null
:boards
,
:project_id
,
false
end
private
...
...
doc/user/project/issue_board.md
View file @
9946d081
...
...
@@ -237,9 +237,9 @@ Issue Board, that is create/delete lists and drag issues around.
## Group Issue Board
Group issue board i analogous to project-level issue board and it is accessible at the group
Group issue board i
s
analogous to project-level issue board and it is accessible at the group
navigation level. A group-level issue board allows you to view all issues from all projects in that group
(currently, it does not see issues from projects in subgroups) Similarly, you can only filter by group labels for these
(currently, it does not see issues from projects in subgroups)
.
Similarly, you can only filter by group labels for these
boards. When updating milestones and labels for an issue through the sidebar update mechanism, again only
group-level objects are available.
...
...
lib/api/group_boards.rb
View file @
9946d081
...
...
@@ -44,7 +44,7 @@ module API
end
segment
':id/boards/:board_id'
do
desc
'Get the lists of a group board'
do
detail
'Does not include backlog and closed lists. This feature was introduced in 10.
4
'
detail
'Does not include backlog and closed lists. This feature was introduced in 10.
6
'
success
Entities
::
List
end
params
do
...
...
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