diff --git a/app/models/changeset.rb b/app/models/changeset.rb index 9e38a74fa..d658fe76c 100644 --- a/app/models/changeset.rb +++ b/app/models/changeset.rb @@ -117,6 +117,7 @@ class Changeset < ActiveRecord::Base def scan_comment_for_issue_ids return if comments.blank? + # keywords used to reference issues ref_keywords = Setting.commit_ref_keywords.downcase.split(",").collect(&:strip) ref_keywords_any = ref_keywords.delete('*') @@ -197,6 +198,7 @@ class Changeset < ActiveRecord::Base # Finds an issue that can be referenced by the commit message def find_referenced_issue_by_id(id) return nil if id.blank? + issue = Issue.find_by_id(id.to_i) if Setting.commit_cross_project_ref? # all issues can be referenced/fixed