BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
579090c3
Commit
579090c3
authored
Nov 05, 2016
by
gfyoung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Require projects before creating milestone
parent
f3231d0f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
milestones_controller.rb
app/controllers/groups/milestones_controller.rb
+1
-1
new.html.haml
app/views/groups/milestones/new.html.haml
+1
-1
milestone-project-require.yml
changelogs/unreleased/milestone-project-require.yml
+4
-0
No files found.
app/controllers/groups/milestones_controller.rb
View file @
579090c3
...
...
@@ -58,7 +58,7 @@ class Groups::MilestonesController < Groups::ApplicationController
def
render_new_with_error
(
empty_project_ids
)
@milestone
=
Milestone
.
new
(
milestone_params
)
@milestone
.
errors
.
add
(
:
project_id
,
"Please select at least one project."
)
if
empty_project_ids
@milestone
.
errors
.
add
(
:
base
,
"Please select at least one project."
)
if
empty_project_ids
render
:new
end
...
...
app/views/groups/milestones/new.html.haml
View file @
579090c3
...
...
@@ -34,7 +34,7 @@
=
f
.
label
:projects
,
"Projects"
,
class:
"control-label"
.col-sm-10
=
f
.
collection_select
:project_ids
,
@group
.
projects
.
non_archived
,
:id
,
:name
,
{
selected:
@group
.
projects
.
non_archived
.
pluck
(
:id
)
},
multiple:
true
,
class:
'select2'
{
selected:
@group
.
projects
.
non_archived
.
pluck
(
:id
)
},
required:
true
,
multiple:
true
,
class:
'select2'
.col-md-6
.form-group
...
...
changelogs/unreleased/milestone-project-require.yml
0 → 100644
View file @
579090c3
---
title
:
Require projects before creating milestone.
merge_request
:
7301
author
:
gfyoung
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