1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-30 20:29:37 +00:00

Removed unused and deprecated Issue#move_to_project method.

git-svn-id: http://svn.redmine.org/redmine/trunk@13711 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2014-12-05 08:58:42 +00:00
parent 8323bc98f5
commit 84eee82209

View File

@ -246,33 +246,6 @@ class Issue < ActiveRecord::Base
@copied_from.present?
end
# Moves/copies an issue to a new project and tracker
# Returns the moved/copied issue on success, false on failure
def move_to_project(new_project, new_tracker=nil, options={})
ActiveSupport::Deprecation.warn "Issue#move_to_project is deprecated, use #project= instead."
if options[:copy]
issue = self.copy
else
issue = self
end
issue.init_journal(User.current, options[:notes])
# Preserve previous behaviour
# #move_to_project doesn't change tracker automatically
issue.send :project=, new_project, true
if new_tracker
issue.tracker = new_tracker
end
# Allow bulk setting of attributes on the issue
if options[:attributes]
issue.attributes = options[:attributes]
end
issue.save ? issue : false
end
def status_id=(status_id)
if status_id.to_s != self.status_id.to_s
self.status = (status_id.present? ? IssueStatus.find_by_id(status_id) : nil)