Subproject name added in csv and pdf exports.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@496 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
d94bcd285a
commit
7faf77804d
|
@ -280,7 +280,7 @@ class ProjectsController < ApplicationController
|
||||||
render :action => 'list_issues' and return unless @query.valid?
|
render :action => 'list_issues' and return unless @query.valid?
|
||||||
|
|
||||||
@issues = Issue.find :all, :order => sort_clause,
|
@issues = Issue.find :all, :order => sort_clause,
|
||||||
:include => [ :assigned_to, :author, :status, :tracker, :priority, {:custom_values => :custom_field} ],
|
:include => [ :assigned_to, :author, :status, :tracker, :priority, :project, {:custom_values => :custom_field} ],
|
||||||
:conditions => @query.statement,
|
:conditions => @query.statement,
|
||||||
:limit => Setting.issues_export_limit
|
:limit => Setting.issues_export_limit
|
||||||
|
|
||||||
|
@ -289,6 +289,7 @@ class ProjectsController < ApplicationController
|
||||||
CSV::Writer.generate(export, l(:general_csv_separator)) do |csv|
|
CSV::Writer.generate(export, l(:general_csv_separator)) do |csv|
|
||||||
# csv header fields
|
# csv header fields
|
||||||
headers = [ "#", l(:field_status),
|
headers = [ "#", l(:field_status),
|
||||||
|
l(:field_project),
|
||||||
l(:field_tracker),
|
l(:field_tracker),
|
||||||
l(:field_priority),
|
l(:field_priority),
|
||||||
l(:field_subject),
|
l(:field_subject),
|
||||||
|
@ -307,9 +308,10 @@ class ProjectsController < ApplicationController
|
||||||
# csv lines
|
# csv lines
|
||||||
@issues.each do |issue|
|
@issues.each do |issue|
|
||||||
fields = [issue.id, issue.status.name,
|
fields = [issue.id, issue.status.name,
|
||||||
|
issue.project.name,
|
||||||
issue.tracker.name,
|
issue.tracker.name,
|
||||||
issue.priority.name,
|
issue.priority.name,
|
||||||
issue.subject,
|
issue.subject,
|
||||||
(issue.assigned_to ? issue.assigned_to.name : ""),
|
(issue.assigned_to ? issue.assigned_to.name : ""),
|
||||||
issue.author.name,
|
issue.author.name,
|
||||||
issue.start_date ? l_date(issue.start_date) : nil,
|
issue.start_date ? l_date(issue.start_date) : nil,
|
||||||
|
@ -337,7 +339,7 @@ class ProjectsController < ApplicationController
|
||||||
render :action => 'list_issues' and return unless @query.valid?
|
render :action => 'list_issues' and return unless @query.valid?
|
||||||
|
|
||||||
@issues = Issue.find :all, :order => sort_clause,
|
@issues = Issue.find :all, :order => sort_clause,
|
||||||
:include => [ :author, :status, :tracker, :priority, :custom_values ],
|
:include => [ :author, :status, :tracker, :priority, :project, :custom_values ],
|
||||||
:conditions => @query.statement,
|
:conditions => @query.statement,
|
||||||
:limit => Setting.issues_export_limit
|
:limit => Setting.issues_export_limit
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
pdf.Cell(30, row_height, issue.priority.name, 0, 0, 'L', 1)
|
pdf.Cell(30, row_height, issue.priority.name, 0, 0, 'L', 1)
|
||||||
pdf.Cell(40, row_height, issue.author.name, 0, 0, 'L', 1)
|
pdf.Cell(40, row_height, issue.author.name, 0, 0, 'L', 1)
|
||||||
pdf.Cell(25, row_height, format_date(issue.updated_on), 0, 0, 'L', 1)
|
pdf.Cell(25, row_height, format_date(issue.updated_on), 0, 0, 'L', 1)
|
||||||
pdf.MultiCell(0, row_height, issue.subject)
|
pdf.MultiCell(0, row_height, (@project == issue.project ? issue.subject : "#{issue.project.name} - #{issue.subject}"))
|
||||||
pdf.Line(10, pdf.GetY, 287, pdf.GetY)
|
pdf.Line(10, pdf.GetY, 287, pdf.GetY)
|
||||||
pdf.SetY(pdf.GetY() + 1)
|
pdf.SetY(pdf.GetY() + 1)
|
||||||
end
|
end
|
||||||
|
|
|
@ -59,10 +59,10 @@
|
||||||
<tr class="<%= cycle("odd", "even") %>">
|
<tr class="<%= cycle("odd", "even") %>">
|
||||||
<th style="width:15px;"><%= check_box_tag "issue_ids[]", issue.id, false, :id => "issue_#{issue.id}" %></th>
|
<th style="width:15px;"><%= check_box_tag "issue_ids[]", issue.id, false, :id => "issue_#{issue.id}" %></th>
|
||||||
<td align="center"><%= link_to issue.id, :controller => 'issues', :action => 'show', :id => issue %></td>
|
<td align="center"><%= link_to issue.id, :controller => 'issues', :action => 'show', :id => issue %></td>
|
||||||
<td align="center"><%= issue.tracker.name %> <%= "(#{issue.project.name})" unless @project && @project == issue.project %></td>
|
<td align="center"><%= issue.tracker.name %></td>
|
||||||
<td><div class="square" style="background:#<%= issue.status.html_color %>;"></div> <%= issue.status.name %></td>
|
<td><div class="square" style="background:#<%= issue.status.html_color %>;"></div> <%= issue.status.name %></td>
|
||||||
<td align="center"><%= issue.priority.name %></td>
|
<td align="center"><%= issue.priority.name %></td>
|
||||||
<td><%= link_to h(issue.subject), :controller => 'issues', :action => 'show', :id => issue %></td>
|
<td><%= "#{issue.project.name} - " unless @project && @project == issue.project %><%= link_to h(issue.subject), :controller => 'issues', :action => 'show', :id => issue %></td>
|
||||||
<td align="center"><%= issue.assigned_to.name if issue.assigned_to %></td>
|
<td align="center"><%= issue.assigned_to.name if issue.assigned_to %></td>
|
||||||
<td align="center"><%= format_time(issue.updated_on) %></td>
|
<td align="center"><%= format_time(issue.updated_on) %></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
Loading…
Reference in New Issue