diff options
author | Jean-Baptiste Barth <jeanbaptiste.barth@gmail.com> | 2010-09-26 13:52:25 +0000 |
---|---|---|
committer | Jean-Baptiste Barth <jeanbaptiste.barth@gmail.com> | 2010-09-26 13:52:25 +0000 |
commit | 2f380a7985929b8b53325569b7c1c5f5230b101c (patch) | |
tree | e233c4c3a647797e1eae38aa9b793df00ab4a5e2 | |
parent | b3c5bf3f2e4089bf214a5a48dcd8e8e819e2878e (diff) | |
download | redmine-2f380a7985929b8b53325569b7c1c5f5230b101c.tar.gz redmine-2f380a7985929b8b53325569b7c1c5f5230b101c.zip |
Fixed: don't reset watchers when changing tracker. #6479
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4181 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/controllers/issues_controller.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 385bfa757..a48a9e8ff 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -284,6 +284,7 @@ private end # TODO: Refactor, lots of extra code in here + # TODO: Changing tracker on an existing issue should not trigger this def build_new_issue_from_params if params[:id].blank? @issue = Issue.new @@ -302,7 +303,9 @@ private end if params[:issue].is_a?(Hash) @issue.safe_attributes = params[:issue] - @issue.watcher_user_ids = params[:issue]['watcher_user_ids'] if User.current.allowed_to?(:add_issue_watchers, @project) + if User.current.allowed_to?(:add_issue_watchers, @project) && @issue.new_record? + @issue.watcher_user_ids = params[:issue]['watcher_user_ids'] + end end @issue.author = User.current @issue.start_date ||= Date.today |