]> source.dussan.org Git - redmine.git/commitdiff
Track project and tracker changes in issue history.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 19 Jun 2008 18:52:20 +0000 (18:52 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 19 Jun 2008 18:52:20 +0000 (18:52 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1565 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/issues_controller.rb
app/helpers/issues_helper.rb

index a86e9b00cadb4d09776c4fbdaeabfad089a1f25f..69c8e7932cd27df1c7da0765c1d283e5965c0ba4 100644 (file)
@@ -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])
       unsaved_issue_ids = []
       @issues.each do |issue|
+        issue.init_journal(User.current)
         unsaved_issue_ids << issue.id unless issue.move_to(@target_project, new_tracker)
       end
       if unsaved_issue_ids.empty?
index 915a80b2a67febd50d93af02ebe8d21a6d95f695..e8f21e9a4c1c3324376173304dbb7f89ca578a80 100644 (file)
@@ -54,9 +54,15 @@ module IssuesHelper
       when 'due_date', 'start_date'
         value = format_date(detail.value.to_date) if detail.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'
         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
+      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'
         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