@@ -234,6 +234,7 class IssuesController < ApplicationController | |||
|
234 | 234 | # Bulk edit a set of issues |
|
235 | 235 | def bulk_edit |
|
236 | 236 | if request.post? |
|
237 | tracker = params[:tracker_id].blank? ? nil : @project.trackers.find_by_id(params[:tracker_id]) | |
|
237 | 238 | status = params[:status_id].blank? ? nil : IssueStatus.find_by_id(params[:status_id]) |
|
238 | 239 | priority = params[:priority_id].blank? ? nil : IssuePriority.find_by_id(params[:priority_id]) |
|
239 | 240 | assigned_to = (params[:assigned_to_id].blank? || params[:assigned_to_id] == 'none') ? nil : User.find_by_id(params[:assigned_to_id]) |
@@ -244,6 +245,7 class IssuesController < ApplicationController | |||
|
244 | 245 | unsaved_issue_ids = [] |
|
245 | 246 | @issues.each do |issue| |
|
246 | 247 | journal = issue.init_journal(User.current, params[:notes]) |
|
248 | issue.tracker = tracker if tracker | |
|
247 | 249 | issue.priority = priority if priority |
|
248 | 250 | issue.assigned_to = assigned_to if assigned_to || params[:assigned_to_id] == 'none' |
|
249 | 251 | issue.category = category if category || params[:category_id] == 'none' |
@@ -421,6 +423,7 class IssuesController < ApplicationController | |||
|
421 | 423 | @assignables << @issue.assigned_to if @issue && @issue.assigned_to && !@assignables.include?(@issue.assigned_to) |
|
422 | 424 | end |
|
423 | 425 | |
|
426 | @trackers = @project.trackers | |
|
424 | 427 | @priorities = IssuePriority.all.reverse |
|
425 | 428 | @statuses = IssueStatus.find(:all, :order => 'position') |
|
426 | 429 | @back = params[:back_url] || request.env['HTTP_REFERER'] |
@@ -8,10 +8,14 | |||
|
8 | 8 | <fieldset> |
|
9 | 9 | <legend><%= l(:label_change_properties) %></legend> |
|
10 | 10 | <p> |
|
11 | <label><%= l(:field_tracker) %>: | |
|
12 | <%= select_tag('tracker_id', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(@project.trackers, :id, :name)) %></label> | |
|
11 | 13 | <% if @available_statuses.any? %> |
|
12 | 14 | <label><%= l(:field_status) %>: |
|
13 | 15 | <%= select_tag('status_id', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(@available_statuses, :id, :name)) %></label> |
|
14 | 16 | <% end %> |
|
17 | </p> | |
|
18 | <p> | |
|
15 | 19 | <label><%= l(:field_priority) %>: |
|
16 | 20 | <%= select_tag('priority_id', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(IssuePriority.all, :id, :name)) %></label> |
|
17 | 21 | <label><%= l(:field_category) %>: |
@@ -19,6 +19,15 | |||
|
19 | 19 | <% end %> |
|
20 | 20 | |
|
21 | 21 | <li class="folder"> |
|
22 | <a href="#" class="submenu"><%= l(:field_tracker) %></a> | |
|
23 | <ul> | |
|
24 | <% @trackers.each do |t| -%> | |
|
25 | <li><%= context_menu_link t.name, {:controller => 'issues', :action => 'bulk_edit', :ids => @issues.collect(&:id), 'tracker_id' => t, :back_to => @back}, :method => :post, | |
|
26 | :selected => (@issue && t == @issue.tracker), :disabled => !@can[:edit] %></li> | |
|
27 | <% end -%> | |
|
28 | </ul> | |
|
29 | </li> | |
|
30 | <li class="folder"> | |
|
22 | 31 | <a href="#" class="submenu"><%= l(:field_priority) %></a> |
|
23 | 32 | <ul> |
|
24 | 33 | <% @priorities.each do |p| -%> |
General Comments 0
You need to be logged in to leave comments.
Login now