Patch #987 ยป redmine1.diff
| app/controllers/issues_controller.rb (working copy) | ||
|---|---|---|
|
:value => (params[:custom_fields] ? params[:custom_fields][x.id.to_s] : nil)) }
|
||
|
@issue.custom_values = @custom_values
|
||
|
if @issue.save
|
||
|
if params[:relation_to]
|
||
|
relation = IssueRelation.new({:relation_type => params[:relation_type], :issue_to_id => params[:relation_to]})
|
||
|
relation.issue_from = @issue
|
||
|
relation.save
|
||
|
end
|
||
|
attach_files(@issue, params[:attachments])
|
||
|
flash[:notice] = l(:notice_successful_create)
|
||
|
Mailer.deliver_issue_add(@issue) if Setting.notified_events.include?('issue_added')
|
||
| app/views/issue_relations/_form.rhtml (working copy) | ||
|---|---|---|
|
<%= error_messages_for 'relation' %>
|
||
|
<p><%= f.select :relation_type, collection_for_relation_type_select, {}, :onchange => "setPredecessorFieldsVisibility();" %>
|
||
|
<%= l(:label_issue) %> #<%= f.text_field :issue_to_id, :size => 6 %>
|
||
|
<span id="predecessor_fields" style="display:none;">
|
||
|
<%= l(:field_delay) %>: <%= f.text_field :delay, :size => 3 %> <%= l(:label_day_plural) %>
|
||
|
</span>
|
||
|
<%= submit_tag l(:button_add) %>
|
||
|
<%= toggle_link l(:button_cancel), 'new-relation-form'%>
|
||
|
</p>
|
||
|
<p><%= f.select :relation_type, collection_for_relation_type_select, {}, :onchange => "setPredecessorFieldsVisibility();" %></p>
|
||
|
<blockquote>
|
||
|
<p><%= link_to l(:label_issue_new), {:controller => 'issues', :action => 'new', :project_id => @project, :relation_to => @issue}, :onclick => 'this.href=this.href+"&relation_type="+$(\'relation_relation_type\').value;' %></p>
|
||
|
<p><%= l(:label_issue) %> #<%= f.text_field :issue_to_id, :size => 6 %>
|
||
|
<span id="predecessor_fields" style="display:none;">
|
||
|
<%= l(:field_delay) %>: <%= f.text_field :delay, :size => 3 %> <%= l(:label_day_plural) %>
|
||
|
</span>
|
||
|
<%= submit_tag l(:button_add) %>
|
||
|
<p>
|
||
|
<p><%= toggle_link l(:button_cancel), 'new-relation-form'%></p>
|
||
|
</blockquote>
|
||
|
<%= javascript_tag "setPredecessorFieldsVisibility();" %>
|
||
| app/views/issues/_form.rhtml (working copy) | ||
|---|---|---|
|
<p><label><%=l(:label_attachment_plural)%></label><%= render :partial => 'attachments/form' %></p>
|
||
|
<% end %>
|
||
|
<% if authorize_for('issue_relations', 'new') || @issue.relations.any? %>
|
||
|
<%= hidden_field_tag 'relation_to', '', :size => 4, :id => nil, :value => params[:relation_to] %>
|
||
|
<%= hidden_field_tag 'relation_type', '', :size => 10, :id => nil, :value => params[:relation_type] %>
|
||
|
<% end %>
|
||
|
<%= wikitoolbar_for 'issue_description' %>
|
||