@@ -54,7 +54,7 class IssueMovesController < ApplicationController | |||
|
54 | 54 | |
|
55 | 55 | def extract_changed_attributes_for_move(params) |
|
56 | 56 | changed_attributes = {} |
|
57 | [:assigned_to_id, :status_id, :start_date, :due_date].each do |valid_attribute| | |
|
57 | [:assigned_to_id, :status_id, :start_date, :due_date, :priority_id].each do |valid_attribute| | |
|
58 | 58 | unless params[valid_attribute].blank? |
|
59 | 59 | changed_attributes[valid_attribute] = (params[valid_attribute] == 'none' ? nil : params[valid_attribute]) |
|
60 | 60 | end |
@@ -34,6 +34,11 | |||
|
34 | 34 | </p> |
|
35 | 35 | |
|
36 | 36 | <p> |
|
37 | <label><%= l(:field_priority) %></label> | |
|
38 | <%= select_tag('priority_id', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(IssuePriority.all, :id, :name)) %> | |
|
39 | </p> | |
|
40 | ||
|
41 | <p> | |
|
37 | 42 | <label><%= l(:field_start_date) %></label> |
|
38 | 43 | <%= text_field_tag 'start_date', '', :size => 10 %><%= calendar_for('start_date') %> |
|
39 | 44 | </p> |
@@ -40,6 +40,19 class IssueMovesControllerTest < ActionController::TestCase | |||
|
40 | 40 | assert_equal 2, Issue.find(2).tracker_id |
|
41 | 41 | end |
|
42 | 42 | |
|
43 | context "#create via bulk move" do | |
|
44 | should "allow changing the issue priority" do | |
|
45 | @request.session[:user_id] = 2 | |
|
46 | post :create, :ids => [1, 2], :priority_id => 6 | |
|
47 | ||
|
48 | assert_redirected_to :controller => 'issues', :action => 'index', :project_id => 'ecookbook' | |
|
49 | assert_equal 6, Issue.find(1).priority_id | |
|
50 | assert_equal 6, Issue.find(2).priority_id | |
|
51 | ||
|
52 | end | |
|
53 | ||
|
54 | end | |
|
55 | ||
|
43 | 56 | def test_bulk_copy_to_another_project |
|
44 | 57 | @request.session[:user_id] = 2 |
|
45 | 58 | assert_difference 'Issue.count', 2 do |
General Comments 0
You need to be logged in to leave comments.
Login now