Patch #29589 » tracker_new_set_default_status_to_initial_value.patch
trunk/app/controllers/trackers_controller.rb (revision 17479) → trunk/app/controllers/trackers_controller.rb (working copy) | ||
---|---|---|
32 | 32 |
end |
33 | 33 | |
34 | 34 |
def new |
35 |
@tracker ||= Tracker.new |
|
35 |
@tracker ||= Tracker.new(:default_status => IssueStatus.sorted.first)
|
|
36 | 36 |
@tracker.safe_attributes = params[:tracker] |
37 | 37 |
@trackers = Tracker.sorted.to_a |
38 | 38 |
@projects = Project.all |
trunk/test/functional/trackers_controller_test.rb (revision 17479) → trunk/test/functional/trackers_controller_test.rb (working copy) | ||
---|---|---|
47 | 47 |
get :new |
48 | 48 |
assert_response :success |
49 | 49 |
assert_select 'input[name=?]', 'tracker[name]' |
50 |
assert_select 'select[name=?]', 'tracker[default_status_id]' do |
|
51 |
assert_select 'option[value=?][selected=selected]', "#{IssueStatus.sorted.first.id}" |
|
52 |
end |
|
50 | 53 |
end |
51 | 54 | |
52 | 55 |
def test_create |