GitLab steht wegen Wartungsarbeiten am Montag, den 10. Mai, zwischen 17:00 und 19:00 Uhr nicht zur Verfügung.

Commit aa6a5ab6 authored by jplang's avatar jplang

Fixed that update_form always proposes the default status when updating an existing issue (#15344).

git-svn-id: https://svn.redmine.org/redmine/trunk@12277 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 0cf904bf
......@@ -426,7 +426,7 @@ class IssuesController < ApplicationController
@issue.safe_attributes = params[:issue]
@priorities = IssuePriority.active
@allowed_statuses = @issue.new_statuses_allowed_to(User.current, true)
@allowed_statuses = @issue.new_statuses_allowed_to(User.current, @issue.new_record?)
@available_watchers = (@issue.project.users.sort + @issue.watcher_users).uniq
end
......
......@@ -2728,6 +2728,16 @@ class IssuesControllerTest < ActionController::TestCase
assert_equal 'This is the test_new issue', issue.subject
end
def test_update_form_should_propose_default_status_for_existing_issue
@request.session[:user_id] = 2
WorkflowTransition.delete_all
WorkflowTransition.create!(:role_id => 1, :tracker_id => 2, :old_status_id => 2, :new_status_id => 3)
xhr :put, :update_form, :project_id => 1, :id => 2
assert_response :success
assert_equal [2,3], assigns(:allowed_statuses).map(&:id).sort
end
def test_put_update_without_custom_fields_param
@request.session[:user_id] = 2
ActionMailer::Base.deliveries.clear
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment