Fixed: fetch_changesets fails on commit comments that close 2 duplicates issues.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1183 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2008-03-01 09:00:02 +00:00
parent c01c64e978
commit 7ee55562ff
1 changed files with 2 additions and 0 deletions

View File

@ -80,6 +80,8 @@ class Changeset < ActiveRecord::Base
# update status of issues # update status of issues
logger.debug "Issues fixed by changeset #{self.revision}: #{issue_ids.join(', ')}." if logger && logger.debug? logger.debug "Issues fixed by changeset #{self.revision}: #{issue_ids.join(', ')}." if logger && logger.debug?
target_issues.each do |issue| target_issues.each do |issue|
# the issue may have been updated by the closure of another one (eg. duplicate)
issue.reload
# don't change the status is the issue is closed # don't change the status is the issue is closed
next if issue.status.is_closed? next if issue.status.is_closed?
user = committer_user || User.anonymous user = committer_user || User.anonymous