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
b2a37f33
Commit
b2a37f33
authored
Jul 18, 2017
by
Felipe Artur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Group issue boards
parent
9bd93670
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
71 additions
and
2 deletions
+71
-2
app/controllers/groups/boards_controller.rb
app/controllers/groups/boards_controller.rb
+14
-0
app/models/ee/board.rb
app/models/ee/board.rb
+3
-0
app/models/license.rb
app/models/license.rb
+4
-1
app/views/groups/_head_issues.html.haml
app/views/groups/_head_issues.html.haml
+5
-0
config/routes/group.rb
config/routes/group.rb
+15
-0
db/migrate/20170718185922_add_group_id_to_boards.rb
db/migrate/20170718185922_add_group_id_to_boards.rb
+7
-0
db/migrate/20170718190627_add_group_boards_indexes.rb
db/migrate/20170718190627_add_group_boards_indexes.rb
+19
-0
db/schema.rb
db/schema.rb
+4
-1
No files found.
app/controllers/groups/boards_controller.rb
0 → 100644
View file @
b2a37f33
class
Groups::BoardsController
<
Groups
::
ApplicationController
before_action
:check_group_issue_boards_available!
def
index
@boards
=
::
Boards
::
ListService
.
new
(
group
,
current_user
).
execute
respond_to
do
|
format
|
format
.
html
format
.
json
do
render
json:
serialize_as_json
(
@boards
)
end
end
end
end
app/models/ee/board.rb
View file @
b2a37f33
...
...
@@ -4,6 +4,9 @@ module EE
prepended
do
belongs_to
:milestone
belongs_to
:group
validates
:group
,
presence:
true
,
unless: :project
end
def
milestone
...
...
app/models/license.rb
View file @
b2a37f33
...
...
@@ -16,6 +16,7 @@ class License < ActiveRecord::Base
ISSUABLE_DEFAULT_TEMPLATES_FEATURE
=
'GitLab_IssuableDefaultTemplates'
.
freeze
ISSUE_BOARD_FOCUS_MODE_FEATURE
=
'GitLab_IssueBoardFocusMode'
.
freeze
ISSUE_BOARD_MILESTONE_FEATURE
=
'GitLab_IssueBoardMilestone'
.
freeze
GROUP_ISSUE_BOARDS_FEATURE
=
'GitLab_GroupIssueBoards'
.
freeze
ISSUE_WEIGHTS_FEATURE
=
'GitLab_IssueWeights'
.
freeze
MERGE_REQUEST_APPROVERS_FEATURE
=
'GitLab_MergeRequestApprovers'
.
freeze
MERGE_REQUEST_REBASE_FEATURE
=
'GitLab_MergeRequestRebase'
.
freeze
...
...
@@ -51,6 +52,7 @@ class License < ActiveRecord::Base
issuable_default_templates:
ISSUABLE_DEFAULT_TEMPLATES_FEATURE
,
issue_board_focus_mode:
ISSUE_BOARD_FOCUS_MODE_FEATURE
,
issue_board_milestone:
ISSUE_BOARD_MILESTONE_FEATURE
,
group_issue_boards:
GROUP_ISSUE_BOARDS_FEATURE
,
issue_weights:
ISSUE_WEIGHTS_FEATURE
,
merge_request_approvers:
MERGE_REQUEST_APPROVERS_FEATURE
,
merge_request_rebase:
MERGE_REQUEST_REBASE_FEATURE
,
...
...
@@ -97,7 +99,8 @@ class License < ActiveRecord::Base
{
GEO_FEATURE
=>
1
},
{
OBJECT_STORAGE_FEATURE
=>
1
},
{
SERVICE_DESK_FEATURE
=>
1
},
{
VARIABLE_ENVIRONMENT_SCOPE_FEATURE
=>
1
}
{
VARIABLE_ENVIRONMENT_SCOPE_FEATURE
=>
1
},
{
GROUP_ISSUE_BOARDS_FEATURE
=>
1
}
].
freeze
EEU_FEATURES
=
[
...
...
app/views/groups/_head_issues.html.haml
View file @
b2a37f33
...
...
@@ -8,6 +8,11 @@
%span
List
=
nav_link
(
path:
'groups#boards'
)
do
=
link_to
group_boards_path
(
@group
),
title:
'Boards'
do
%span
Boards
=
nav_link
(
path:
'labels#index'
)
do
=
link_to
group_labels_path
(
@group
),
title:
'Labels'
do
%span
...
...
config/routes/group.rb
View file @
b2a37f33
...
...
@@ -61,6 +61,21 @@ scope(path: 'groups/*group_id',
resources
:variables
,
only:
[
:index
,
:show
,
:update
,
:create
,
:destroy
]
end
## EE-specific
resources
:boards
,
only:
[
:index
,
:show
,
:create
,
:update
,
:destroy
]
do
scope
module: :boards
do
resources
:issues
,
only:
[
:index
,
:update
]
resources
:lists
,
only:
[
:index
,
:create
,
:update
,
:destroy
]
do
collection
do
post
:generate
end
resources
:issues
,
only:
[
:index
,
:create
]
end
end
end
end
scope
(
path:
'groups/*id'
,
...
...
db/migrate/20170718185922_add_group_id_to_boards.rb
0 → 100644
View file @
b2a37f33
class
AddGroupIdToBoards
<
ActiveRecord
::
Migration
DOWNTIME
=
false
def
change
add_column
:boards
,
:group_id
,
:integer
end
end
db/migrate/20170718190627_add_group_boards_indexes.rb
0 → 100644
View file @
b2a37f33
class
AddGroupBoardsIndexes
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
disable_ddl_transaction!
DOWNTIME
=
false
def
up
add_concurrent_foreign_key
:boards
,
:namespaces
,
column: :group_id
,
on_delete: :cascade
add_concurrent_index
:boards
,
:group_id
end
def
down
remove_foreign_key
:boards
,
column: :group_id
remove_concurrent_index
:boards
,
:group_id
end
end
db/schema.rb
View file @
b2a37f33
...
...
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
201707
07184244
)
do
ActiveRecord
::
Schema
.
define
(
version:
201707
18190627
)
do
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
...
...
@@ -212,8 +212,10 @@ ActiveRecord::Schema.define(version: 20170707184244) do
t
.
datetime
"updated_at"
,
null:
false
t
.
string
"name"
,
default:
"Development"
,
null:
false
t
.
integer
"milestone_id"
t
.
integer
"group_id"
end
add_index
"boards"
,
[
"group_id"
],
name:
"index_boards_on_group_id"
,
using: :btree
add_index
"boards"
,
[
"milestone_id"
],
name:
"index_boards_on_milestone_id"
,
using: :btree
add_index
"boards"
,
[
"project_id"
],
name:
"index_boards_on_project_id"
,
using: :btree
...
...
@@ -1895,6 +1897,7 @@ ActiveRecord::Schema.define(version: 20170707184244) do
add_foreign_key
"approvals"
,
"merge_requests"
,
name:
"fk_310d714958"
,
on_delete: :cascade
add_foreign_key
"approver_groups"
,
"namespaces"
,
column:
"group_id"
,
on_delete: :cascade
add_foreign_key
"boards"
,
"namespaces"
,
column:
"group_id"
,
name:
"fk_1e9a074a35"
,
on_delete: :cascade
add_foreign_key
"boards"
,
"projects"
,
name:
"fk_f15266b5f9"
,
on_delete: :cascade
add_foreign_key
"chat_teams"
,
"namespaces"
,
on_delete: :cascade
add_foreign_key
"ci_builds"
,
"ci_pipelines"
,
column:
"auto_canceled_by_id"
,
name:
"fk_a2141b1522"
,
on_delete: :nullify
...
...
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