comparison app/models/changeset.rb @ 1517:dffacf8a6908 redmine-2.5

Update to Redmine SVN revision 13367 on 2.5-stable branch
author Chris Cannam
date Tue, 09 Sep 2014 09:29:00 +0100
parents e248c7af89ec
children fb9a13467253
comparison
equal deleted inserted replaced
1516:b450a9d58aed 1517:dffacf8a6908
196 end 196 end
197 197
198 # Finds an issue that can be referenced by the commit message 198 # Finds an issue that can be referenced by the commit message
199 def find_referenced_issue_by_id(id) 199 def find_referenced_issue_by_id(id)
200 return nil if id.blank? 200 return nil if id.blank?
201 issue = Issue.find_by_id(id.to_i, :include => :project) 201 issue = Issue.includes(:project).where(:id => id.to_i).first
202 if Setting.commit_cross_project_ref? 202 if Setting.commit_cross_project_ref?
203 # all issues can be referenced/fixed 203 # all issues can be referenced/fixed
204 elsif issue 204 elsif issue
205 # issue that belong to the repository project, a subproject or a parent project only 205 # issue that belong to the repository project, a subproject or a parent project only
206 unless issue.project && 206 unless issue.project &&