summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-10-05 10:33:03 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-10-05 10:33:03 +0000
commit7b1b605ae8e6762f4bf76cecf32e280f75bf72c8 (patch)
tree2cb329d520e11f5d9deea6a995a3d4c7f5f57f47 /app
parent0444ecca3c876cae6ee4f83f41c4cd0bb7ee6f74 (diff)
downloadredmine-7b1b605ae8e6762f4bf76cecf32e280f75bf72c8.tar.gz
redmine-7b1b605ae8e6762f4bf76cecf32e280f75bf72c8.zip
Don't update issues nor log time when importing old changesets (#4823).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12199 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/models/changeset.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/models/changeset.rb b/app/models/changeset.rb
index 87fdaffcd..2c574f75e 100644
--- a/app/models/changeset.rb
+++ b/app/models/changeset.rb
@@ -132,8 +132,11 @@ class Changeset < ActiveRecord::Base
issue, hours = find_referenced_issue_by_id(m[0].to_i), m[2]
if issue
referenced_issues << issue
- fix_issue(issue, action) if fix_keywords.include?(action)
- log_time(issue, hours) if hours && Setting.commit_logtime_enabled?
+ # Don't update issues or log time when importing old commits
+ unless repository.created_on && committed_on && committed_on < repository.created_on
+ fix_issue(issue, action) if fix_keywords.include?(action)
+ log_time(issue, hours) if hours && Setting.commit_logtime_enabled?
+ end
end
end
end