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
Léo-Paul Géneau
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
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
app/controllers/groups/milestones_controller.rb
app/controllers/groups/milestones_controller.rb
+1
-1
app/views/groups/milestones/new.html.haml
app/views/groups/milestones/new.html.haml
+1
-1
changelogs/unreleased/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