263 |
263 |
users
|
264 |
264 |
end
|
265 |
265 |
|
266 |
|
def email_issue_attributes(issue, user)
|
|
266 |
def email_issue_attributes(issue, user, html)
|
267 |
267 |
items = []
|
268 |
268 |
%w(author status priority assigned_to category fixed_version).each do |attribute|
|
269 |
269 |
unless issue.disabled_core_fields.include?(attribute+"_id")
|
270 |
|
items << "#{l("field_#{attribute}")}: #{issue.send attribute}"
|
|
270 |
if html
|
|
271 |
items << content_tag('strong', "#{l("field_#{attribute}")}: ") + (issue.send attribute)
|
|
272 |
else
|
|
273 |
items << "#{l("field_#{attribute}")}: #{issue.send attribute}"
|
|
274 |
end
|
271 |
275 |
end
|
272 |
276 |
end
|
273 |
277 |
issue.visible_custom_field_values(user).each do |value|
|
274 |
|
items << "#{value.custom_field.name}: #{show_value(value, false)}"
|
|
278 |
if html
|
|
279 |
items << content_tag('strong', "#{value.custom_field.name}: ") + show_value(value, false)
|
|
280 |
else
|
|
281 |
items << "#{value.custom_field.name}: #{show_value(value, false)}"
|
|
282 |
end
|
275 |
283 |
end
|
276 |
284 |
items
|
277 |
285 |
end
|
278 |
286 |
|
279 |
287 |
def render_email_issue_attributes(issue, user, html=false)
|
280 |
|
items = email_issue_attributes(issue, user)
|
|
288 |
items = email_issue_attributes(issue, user, html)
|
281 |
289 |
if html
|
282 |
|
content_tag('ul', items.map{|s| content_tag('li', s)}.join("\n").html_safe)
|
|
290 |
content_tag('ul', items.map{|s| content_tag('li', s)}.join("\n").html_safe, :class => "details")
|
283 |
291 |
else
|
284 |
292 |
items.map{|s| "* #{s}"}.join("\n")
|
285 |
293 |
end
|