Project

General

Profile

Feature #15919 » 0001-Set-default_assigned_to_id-in-category.patch

Mizuki ISHIKAWA, 2017-10-31 07:08

View differences:

app/views/issues/_attributes.html.erb
19 19
<% end %>
20 20

  
21 21
<% if @issue.safe_attribute?('category_id') && @issue.project.issue_categories.any? %>
22
<p><%= f.select :category_id, (@issue.project.issue_categories.collect {|c| [c.name, c.id]}), :include_blank => true, :required => @issue.required_attribute?('category_id') %>
22
<p><%= f.select :category_id, (@issue.project.issue_categories.collect {|c| [c.name, c.id]}), {:include_blank => true, :required => @issue.required_attribute?('category_id')}, :onchange => ("updateIssueFrom('#{escape_javascript update_issue_form_path(@project, @issue)}', this)" if @issue.new_record?) %>
23 23
<%= link_to(l(:label_issue_category_new),
24 24
            new_project_issue_category_path(@issue.project),
25 25
            :remote => true,
app/views/issues/new.js.erb
1 1
replaceIssueFormWith('<%= escape_javascript(render :partial => 'form') %>');
2
<% if params[:form_update_triggered_by] == "issue_project_id" %>
3
$("#watchers_form_container").html('<%= escape_javascript(render :partial => 'issues/watchers_form') %>');
2
<% case params[:form_update_triggered_by] %>
3
<% when "issue_project_id" %>
4
  $("#watchers_form_container").html('<%= escape_javascript(render :partial => 'issues/watchers_form') %>');
5
<% when "issue_category_id" %>
6
  <% if  @issue.assigned_to_id.blank? %>
7
    $('#issue_assigned_to_id').val('<%= @issue.category.try(:assigned_to_id) %>');
8
  <% end %>
4 9
<% end %>
(1-1/3)