conditions.merge!(:project_id => project_ids)
end
issues = version.fixed_issues.visible.find(:all,
- :include => [:status, :tracker, :priority],
+ :include => [:project, :status, :tracker, :priority],
:conditions => conditions,
- :order => "#{Tracker.table_name}.position, #{Issue.table_name}.id")
+ :order => "#{Project.table_name}.lft, #{Tracker.table_name}.position, #{Issue.table_name}.id")
@issues_by_version[version] = issues
end
end
# link_to_issue(issue) # => Defect #6: This is the subject
# link_to_issue(issue, :truncate => 6) # => Defect #6: This i...
# link_to_issue(issue, :subject => false) # => Defect #6
+ # link_to_issue(issue, :project => true) # => Foo - Defect #6
#
def link_to_issue(issue, options={})
title = nil
:class => issue.css_classes,
:title => title
s << ": #{h subject}" if subject
+ s = "#{h issue.project} - " + s if options[:project]
s
end
<fieldset class="related-issues"><legend><%= l(:label_related_issues) %></legend>
<ul>
<%- issues.each do |issue| -%>
- <li><%= link_to_issue(issue) %></li>
+ <li><%= link_to_issue(issue, :project => (@project != issue.project)) %></li>
<%- end -%>
</ul>
</fieldset>
<h3><%= l(:label_roadmap) %></h3>
<% @trackers.each do |tracker| %>
<label><%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s), :id => nil %>
- <%= tracker.name %></label><br />
+ <%=h tracker.name %></label><br />
<% end %>
<br />
<label for="completed"><%= check_box_tag "completed", 1, params[:completed] %> <%= l(:label_show_completed_versions) %></label>