diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb
index 3dff9c414..b2eb6fd0e 100644
--- a/app/helpers/projects_helper.rb
+++ b/app/helpers/projects_helper.rb
@@ -267,6 +267,15 @@ module ProjectsHelper
project_name = versions.blank? ? "" : versions.first.project.name
grouped = Hash.new {|h,k| h[k] = []}
grouped[project_name] << ["请选择里程碑", 0]
+
+ unless selected.nil?
+ if (params[:action] == "show" ) && Version.find(selected.id).status == "closed"
+ version_name = Version.find(selected.id).name
+ grouped[project_name] << [version_name, selected.id]
+ end
+ end
+
+
versions.each do |version|
grouped[version.project.name] << [version.name, version.id]
end
diff --git a/app/views/issues/_form.html.erb b/app/views/issues/_form.html.erb
index 02ae7f677..13bde48a5 100644
--- a/app/views/issues/_form.html.erb
+++ b/app/views/issues/_form.html.erb
@@ -160,9 +160,5 @@
}
// 里程碑添加默认选项
$("#issue_fixed_version_id option[value='']").remove();
- <%# if params[:action] == "new" %>
-// $('#issue_fixed_version_id').prepend("");
- <%# else %>
-// $('#issue_fixed_version_id').prepend("");
- <%# end %>
+