Defect #28502 » change_me_to_usable.patch
app/controllers/issues_controller.rb | ||
---|---|---|
519 | 519 |
# so we can use the default version for the new project |
520 | 520 |
attrs.delete(:fixed_version_id) |
521 | 521 |
end |
522 |
attrs[:assigned_to_id] = User.current.id if attrs[:assigned_to_id] == 'me' |
|
522 | 523 |
@issue.safe_attributes = attrs |
523 | 524 | |
524 | 525 |
if @issue.project |
test/functional/issues_controller_test.rb | ||
---|---|---|
2419 | 2419 |
end |
2420 | 2420 |
end |
2421 | 2421 | |
2422 |
def test_new_with_me_assigned_to_id |
|
2423 |
@request.session[:user_id] = 2 |
|
2424 |
get :new, :params => { |
|
2425 |
:issue => { :assigned_to_id => 'me' } |
|
2426 |
} |
|
2427 |
assert_response :success |
|
2428 |
assert_select 'select[name=?]', 'issue[assigned_to_id]' do |
|
2429 |
assert_select 'option[value="2"][selected=selected]' |
|
2430 |
end |
|
2431 |
end |
|
2432 | ||
2422 | 2433 |
def test_new_should_select_default_status |
2423 | 2434 |
@request.session[:user_id] = 2 |
2424 | 2435 |