Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
(For redmine 2.3.1) Hide status field in new ticket form.
diff --git app/views/issues/_attributes.html.erb app/views/issues/_attributes.html.erb
index 0e29701..830dfc6 100644
--- app/views/issues/_attributes.html.erb
+++ app/views/issues/_attributes.html.erb
@@ -2,7 +2,8 @@
<div class="splitcontent">
<div class="splitcontentleft">
-<% if @issue.safe_attribute?('status_id') && @allowed_statuses.present? %>
+<% if params[:action] == 'new' %>
+<% elsif @issue.safe_attribute?('status_id') && @allowed_statuses.present? %>
<p><%= f.select :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), {:required => true},
:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')" %></p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.