Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
9946d081
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
9946d081
编写于
3月 05, 2018
作者:
F
Felipe Artur
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Address review comments
上级
dd071c4b
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
31 addition
and
47 deletion
+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
未找到文件。
app/controllers/boards/issues_controller.rb
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
9946d081
---
title
:
Add one group
port to CE
title
:
Add one group
board to Libre
merge_request
:
author
:
type
:
added
config/routes/group.rb
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录