summaryrefslogtreecommitdiffstats
path: root/app/models/repository.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-04-24 13:57:27 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-04-24 13:57:27 +0000
commit941a240535ac1b62f210afefefa4a0013b185a5f (patch)
tree5090119acea6a096027d4581c24975cafe1d4340 /app/models/repository.rb
parented5b5d0559015a1d31d44b6c606cab24cc72926c (diff)
downloadredmine-941a240535ac1b62f210afefefa4a0013b185a5f.tar.gz
redmine-941a240535ac1b62f210afefefa4a0013b185a5f.zip
Commit messages are now scanned for referenced or fixed issue IDs.
Keywords and the status to apply to fixed issues can be defined in Admin -> Settings. Default keywords: - for referencing issues: refs, references, IssueID - for fixing issues: fixes,closes There's no default status defined for fixed issue. You'll have to specify it if you want to enable auto closure of issues. Example of a working commit message: "This commit references #1, #2 and fixes #3" git-svn-id: http://redmine.rubyforge.org/svn/trunk@473 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r--app/models/repository.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb
index 8b8de5c42..5b7feb79f 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -79,10 +79,19 @@ class Repository < ActiveRecord::Base
end
end
+ def scan_changesets_for_issue_ids
+ self.changesets.each(&:scan_comment_for_issue_ids)
+ end
+
# fetch new changesets for all repositories
# can be called periodically by an external script
# eg. ruby script/runner "Repository.fetch_changesets"
def self.fetch_changesets
find(:all).each(&:fetch_changesets)
end
+
+ # scan changeset comments to find related and fixed issues for all repositories
+ def self.scan_changesets_for_issue_ids
+ find(:all).each(&:scan_changesets_for_issue_ids)
+ end
end