##// END OF EJS Templates
Added custom fields marked as "For all projects" to the csv export of the cross project issue list....
Jean-Philippe Lang -
r920:c383486d711d
parent child
Show More
@@ -125,10 +125,10 module IssuesHelper
125 l(:field_created_on),
125 l(:field_created_on),
126 l(:field_updated_on)
126 l(:field_updated_on)
127 ]
127 ]
128 # only export custom fields if project is given
128 # Export project custom fields if project is given
129 for custom_field in project.all_custom_fields
129 # otherwise export custom fields marked as "For all projects"
130 headers << custom_field.name
130 custom_fields = project.nil? ? IssueCustomField.for_all : project.all_custom_fields
131 end if project
131 custom_fields.each {|f| headers << f.name}
132 csv << headers.collect {|c| begin; ic.iconv(c.to_s); rescue; c.to_s; end }
132 csv << headers.collect {|c| begin; ic.iconv(c.to_s); rescue; c.to_s; end }
133 # csv lines
133 # csv lines
134 issues.each do |issue|
134 issues.each do |issue|
@@ -148,9 +148,7 module IssuesHelper
148 l_datetime(issue.created_on),
148 l_datetime(issue.created_on),
149 l_datetime(issue.updated_on)
149 l_datetime(issue.updated_on)
150 ]
150 ]
151 for custom_field in project.all_custom_fields
151 custom_fields.each {|f| fields << show_value(issue.custom_value_for(f)) }
152 fields << (show_value issue.custom_value_for(custom_field))
153 end if project
154 csv << fields.collect {|c| begin; ic.iconv(c.to_s); rescue; c.to_s; end }
152 csv << fields.collect {|c| begin; ic.iconv(c.to_s); rescue; c.to_s; end }
155 end
153 end
156 end
154 end
General Comments 0
You need to be logged in to leave comments. Login now