Skip to content

Commit

Permalink
Add description back into CSV
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve England committed Aug 11, 2010
1 parent 6e3b801 commit 90019f0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/helpers/issues_helper.rb
Expand Up @@ -146,11 +146,14 @@ def issues_to_csv(query, sort_clause, project = nil)
decimal_separator = l(:general_csv_decimal_separator)
export = FCSV.generate(:col_sep => l(:general_csv_separator)) do |csv|
# csv header fields
headers = [ "#"] + query.columns.map(&:name)
headers = ["#"] + query.columns.map(&:name)
# Description in the last column
headers << l(:field_description)
csv << headers.collect {|c| begin; ic.iconv(c.to_s); rescue; c.to_s; end }
# csv lines
@query.issues(:order => sort_clause, :include => [:assigned_to, :tracker, :priority, :category, :fixed_version]).each do |issue|
fields = [issue.id] + query.columns.map{|q| q.value(issue) }
fields << issue.description
csv << fields.collect {|c| begin; ic.iconv(c.to_s); rescue; c.to_s; end }
end
end
Expand Down

0 comments on commit 90019f0

Please sign in to comment.