Project

General

Profile

Feature #779 » IssueRepositoriesGrobal.patch

patch of ad-hoc solution for support multiple SCM "like". - Aruo Miura, 2008-03-26 08:09

View differences:

app/models/changeset.rb (working copy)
comments.scan(Regexp.new("(#{kw_regexp})[\s:]+(([\s,;&]*#?\\d+)+)", Regexp::IGNORECASE)).each do |match|
action = match[0]
target_issue_ids = match[1].scan(/\d+/)
target_issues = repository.project.issues.find_all_by_id(target_issue_ids)
#target_issues = repository.project.issues.find_all_by_id(target_issue_ids)
target_issues = Issue.find_all_by_id(target_issue_ids)
if fix_status && fix_keywords.include?(action.downcase)
# update status of issues
logger.debug "Issues fixed by changeset #{self.revision}: #{issue_ids.join(', ')}." if logger && logger.debug?
app/views/issues/_changesets.rhtml (working copy)
<% changesets.each do |changeset| %>
<div class="changeset <%= cycle('odd', 'even') %>">
<p><%= link_to("#{l(:label_revision)} #{changeset.revision}",
:controller => 'repositories', :action => 'revision', :id => @project, :rev => changeset.revision) %><br />
:controller => 'repositories', :action => 'revision', :id => changeset.repository.project, :rev => changeset.revision) %><br />
<span class="author"><%= authoring(changeset.committed_on, changeset.committer) %></span></p>
<%= textilizable(changeset, :comments) %>
</div>
app/views/issues/show.rhtml (working copy)
<% end %>
</div>
<% if @issue.changesets.any? && User.current.allowed_to?(:view_changesets, @project) %>
<% #if @issue.changesets.any? && User.current.allowed_to?(:view_changesets, @project) %>
<% if @issue.changesets.any? %>
<div id="issue-changesets">
<h3><%=l(:label_associated_revisions)%></h3>
<%= render :partial => 'changesets', :locals => { :changesets => @issue.changesets} %>
(1-1/9)