summaryrefslogtreecommitdiffstats
path: root/app/controllers/issues_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2019-03-15 09:37:04 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2019-03-15 09:37:04 +0000
commit7a11864812f790df7ffbf6ef61c9818caedae027 (patch)
tree99bfda5c4dd80f6a1b4b40b3d0abd6e561ce8964 /app/controllers/issues_controller.rb
parent9f24ceb6b3facdac5ae5cb3782779ca00465f991 (diff)
downloadredmine-7a11864812f790df7ffbf6ef61c9818caedae027.tar.gz
redmine-7a11864812f790df7ffbf6ef61c9818caedae027.zip
Support issue[assigned_to_id]=me when prefilling issues (#28502).
Patch by Mizuki ISHIKAWA. git-svn-id: http://svn.redmine.org/redmine/trunk@17964 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/issues_controller.rb')
-rw-r--r--app/controllers/issues_controller.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index 7d9a9ee6e..0630a1b2d 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -466,6 +466,7 @@ class IssuesController < ApplicationController
@issue.init_journal(User.current)
issue_attributes = params[:issue]
+ issue_attributes[:assigned_to_id] = User.current.id if issue_attributes && issue_attributes[:assigned_to_id] == 'me'
if issue_attributes && params[:conflict_resolution]
case params[:conflict_resolution]
when 'overwrite'
@@ -522,6 +523,7 @@ class IssuesController < ApplicationController
# so we can use the default version for the new project
attrs.delete(:fixed_version_id)
end
+ attrs[:assigned_to_id] = User.current.id if attrs[:assigned_to_id] == 'me'
@issue.safe_attributes = attrs
if @issue.project