- 'app/helpers/attachments_helper.rb'
- 'app/helpers/queries_helper.rb'
- 'app/models/issue_query.rb'
- - 'lib/redmine/export/pdf/issues_pdf_helper.rb'
# Cop supports --auto-correct.
Layout/EmptyLineAfterGuardClause:
# fetch row values
def fetch_row_values(issue, query, level)
query.inline_columns.collect do |column|
- s = if column.is_a?(QueryCustomFieldColumn)
- cv = issue.visible_custom_field_values.detect {|v| v.custom_field_id == column.custom_field.id}
- show_value(cv, false)
- else
- value = issue.send(column.name)
- case column.name
- when :subject
- value = " " * level + value
- when :attachments
- value = value.to_a.map {|a| a.filename}.join("\n")
- end
- if value.is_a?(Date)
- format_date(value)
- elsif value.is_a?(Time)
- format_time(value)
- elsif value.is_a?(Float)
- sprintf "%.2f", value
+ s =
+ if column.is_a?(QueryCustomFieldColumn)
+ cv = issue.visible_custom_field_values.detect {|v| v.custom_field_id == column.custom_field.id}
+ show_value(cv, false)
else
- value
+ value = issue.send(column.name)
+ case column.name
+ when :subject
+ value = " " * level + value
+ when :attachments
+ value = value.to_a.map {|a| a.filename}.join("\n")
+ end
+ if value.is_a?(Date)
+ format_date(value)
+ elsif value.is_a?(Time)
+ format_time(value)
+ elsif value.is_a?(Float)
+ sprintf "%.2f", value
+ else
+ value
+ end
end
- end
s.to_s
end
end