Track project and tracker changes in issue history.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1565 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
0870f6267f
commit
9cfa233001
|
@ -285,6 +285,7 @@ class IssuesController < ApplicationController
|
||||||
new_tracker = params[:new_tracker_id].blank? ? nil : @target_project.trackers.find_by_id(params[:new_tracker_id])
|
new_tracker = params[:new_tracker_id].blank? ? nil : @target_project.trackers.find_by_id(params[:new_tracker_id])
|
||||||
unsaved_issue_ids = []
|
unsaved_issue_ids = []
|
||||||
@issues.each do |issue|
|
@issues.each do |issue|
|
||||||
|
issue.init_journal(User.current)
|
||||||
unsaved_issue_ids << issue.id unless issue.move_to(@target_project, new_tracker)
|
unsaved_issue_ids << issue.id unless issue.move_to(@target_project, new_tracker)
|
||||||
end
|
end
|
||||||
if unsaved_issue_ids.empty?
|
if unsaved_issue_ids.empty?
|
||||||
|
|
|
@ -54,9 +54,15 @@ module IssuesHelper
|
||||||
when 'due_date', 'start_date'
|
when 'due_date', 'start_date'
|
||||||
value = format_date(detail.value.to_date) if detail.value
|
value = format_date(detail.value.to_date) if detail.value
|
||||||
old_value = format_date(detail.old_value.to_date) if detail.old_value
|
old_value = format_date(detail.old_value.to_date) if detail.old_value
|
||||||
|
when 'project_id'
|
||||||
|
p = Project.find_by_id(detail.value) and value = p.name if detail.value
|
||||||
|
p = Project.find_by_id(detail.old_value) and old_value = p.name if detail.old_value
|
||||||
when 'status_id'
|
when 'status_id'
|
||||||
s = IssueStatus.find_by_id(detail.value) and value = s.name if detail.value
|
s = IssueStatus.find_by_id(detail.value) and value = s.name if detail.value
|
||||||
s = IssueStatus.find_by_id(detail.old_value) and old_value = s.name if detail.old_value
|
s = IssueStatus.find_by_id(detail.old_value) and old_value = s.name if detail.old_value
|
||||||
|
when 'tracker_id'
|
||||||
|
t = Tracker.find_by_id(detail.value) and value = t.name if detail.value
|
||||||
|
t = Tracker.find_by_id(detail.old_value) and old_value = t.name if detail.old_value
|
||||||
when 'assigned_to_id'
|
when 'assigned_to_id'
|
||||||
u = User.find_by_id(detail.value) and value = u.name if detail.value
|
u = User.find_by_id(detail.value) and value = u.name if detail.value
|
||||||
u = User.find_by_id(detail.old_value) and old_value = u.name if detail.old_value
|
u = User.find_by_id(detail.old_value) and old_value = u.name if detail.old_value
|
||||||
|
|
Loading…
Reference in New Issue