Patch #2144 ยป ParentRepository.0.7.3.patch
app/controllers/repositories_controller.rb (working copy) | ||
---|---|---|
190 | 190 |
|
191 | 191 |
def find_repository |
192 | 192 |
@project = Project.find(params[:id]) |
193 |
@repository = @project.repository |
|
193 |
if @project.repository.nil? |
|
194 |
@repository = Project.find(@project.parent_id).repository |
|
195 |
else |
|
196 |
@repository = @project.repository |
|
197 |
end |
|
194 | 198 |
render_404 and return false unless @repository |
195 | 199 |
@path = params[:path].join('/') unless params[:path].nil? |
196 | 200 |
@path ||= '' |
app/models/changeset.rb (working copy) | ||
---|---|---|
83 | 83 |
action = match[0] |
84 | 84 |
target_issue_ids = match[1].scan(/\d+/) |
85 | 85 |
target_issues = repository.project.issues.find_all_by_id(target_issue_ids) |
86 | ||
87 |
#Ora i child |
|
88 |
Project.find(:all, :conditions => ["parent_id = ?", repository.project.id]).each { |cp| |
|
89 |
target_issues = target_issues + cp.issues.find_all_by_id(target_issue_ids) |
|
90 |
} |
|
91 |
|
|
86 | 92 |
if fix_status && fix_keywords.include?(action.downcase) |
87 | 93 |
# update status of issues |
88 | 94 |
logger.debug "Issues fixed by changeset #{self.revision}: #{issue_ids.join(', ')}." if logger && logger.debug? |