IssueRepositoriesGrobal.patch

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

Download (2.33 KB)

View differences:

app/models/changeset.rb (working copy)
78 78
    comments.scan(Regexp.new("(#{kw_regexp})[\s:]+(([\s,;&]*#?\\d+)+)", Regexp::IGNORECASE)).each do |match|
79 79
      action = match[0]
80 80
      target_issue_ids = match[1].scan(/\d+/)
81
      target_issues = repository.project.issues.find_all_by_id(target_issue_ids)
81
      #target_issues = repository.project.issues.find_all_by_id(target_issue_ids)
82
      target_issues = Issue.find_all_by_id(target_issue_ids)
82 83
      if fix_status && fix_keywords.include?(action.downcase)
83 84
        # update status of issues
84 85
        logger.debug "Issues fixed by changeset #{self.revision}: #{issue_ids.join(', ')}." if logger && logger.debug?
app/views/issues/_changesets.rhtml (working copy)
1 1
<% changesets.each do |changeset| %>
2 2
    <div class="changeset <%= cycle('odd', 'even') %>">
3 3
    <p><%= link_to("#{l(:label_revision)} #{changeset.revision}",
4
                :controller => 'repositories', :action => 'revision', :id => @project, :rev => changeset.revision) %><br />
4
                :controller => 'repositories', :action => 'revision', :id => changeset.repository.project, :rev => changeset.revision) %><br />
5 5
        <span class="author"><%= authoring(changeset.committed_on, changeset.committer) %></span></p>
6 6
    <%= textilizable(changeset, :comments) %>
7 7
    </div>
app/views/issues/show.rhtml (working copy)
73 73
<% end %>
74 74

  
75 75
</div>
76

  
77
<% if @issue.changesets.any? && User.current.allowed_to?(:view_changesets, @project) %>
76
<% #if @issue.changesets.any? && User.current.allowed_to?(:view_changesets, @project) %>
77
<% if @issue.changesets.any? %>
78 78
<div id="issue-changesets">
79 79
<h3><%=l(:label_associated_revisions)%></h3>
80 80
<%= render :partial => 'changesets', :locals => { :changesets => @issue.changesets} %>