BigW Consortium Gitlab

Commit a5c3bfc9 by Sean McGivern

Merge branch 'milestone-project-require' into 'master'

Require projects before creating milestone Closes #24101 See merge request !7301
parents d96ec63e 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
......
......@@ -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
......
---
title: Require projects before creating milestone.
merge_request: 7301
author: gfyoung
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment