summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Goerzen <jgoerzen@complete.org>2008-03-08 19:48:25 +0000
committerJohn Goerzen <jgoerzen@complete.org>2008-03-08 19:48:25 +0000
commit4e6f5fef206526caa618580d4ec5e76a4f6f446f (patch)
tree1b7a28c7502b32e6e299a7610e58e64d3afa0206
parent78d70c12b6b27b97be3b1a55ee000b1000bc0e83 (diff)
downloadredmine-4e6f5fef206526caa618580d4ec5e76a4f6f446f.tar.gz
redmine-4e6f5fef206526caa618580d4ec5e76a4f6f446f.zip
Fix bug integration with closing bugs by changesets
previously it just added "rREV". Now if this is non-numeric, we add commit:"SCMID" to make it work for things like Git git-svn-id: http://redmine.rubyforge.org/svn/branches/work@1212 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--git/app/models/changeset.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/git/app/models/changeset.rb b/git/app/models/changeset.rb
index 79b70237e..e77b04eca 100644
--- a/git/app/models/changeset.rb
+++ b/git/app/models/changeset.rb
@@ -84,7 +84,11 @@ class Changeset < ActiveRecord::Base
# don't change the status is the issue is closed
next if issue.status.is_closed?
user = committer_user || User.anonymous
- journal = issue.init_journal(user, l(:text_status_changed_by_changeset, "r#{self.revision}"))
+ csettext = "r#{self.revision}"
+ if self.scmid && (! (csettext =~ /^r[0-9]+$/))
+ csettext = "commit:\"#{self.scmid}\""
+ end
+ journal = issue.init_journal(user, l(:text_status_changed_by_changeset, csettext))
issue.status = fix_status
issue.done_ratio = done_ratio if done_ratio
issue.save