Patch #39849 ยป 0001-Optimize-IssueCategory-SQL-queries-when-showing-an-i.patch
app/views/issues/_attributes.html.erb | ||
---|---|---|
32 | 32 |
</p> |
33 | 33 |
<% end %> |
34 | 34 | |
35 |
<% if @issue.safe_attribute?('category_id') && @issue.project.issue_categories.any? %>
|
|
36 |
<p><%= f.select :category_id, (@issue.project.issue_categories.collect {|c| [c.name, c.id]}),
|
|
35 |
<% if @issue.safe_attribute?('category_id') && (category_options = @issue.project.issue_categories.pluck(:name, :id)).present? %>
|
|
36 |
<p><%= f.select :category_id, category_options,
|
|
37 | 37 |
{:include_blank => true, :required => @issue.required_attribute?('category_id')}, |
38 | 38 |
:onchange => ("updateIssueFrom('#{escape_javascript(update_issue_form_path(@project, @issue))}', this)" if @issue.new_record?) %> |
39 | 39 |
<%= link_to(l(:label_issue_category_new), |