Defect #33103 ยป 33103.patch
lib/redmine/export/pdf/issues_pdf_helper.rb | ||
---|---|---|
379 | 379 |
cv = issue.visible_custom_field_values.detect {|v| v.custom_field_id == column.custom_field.id} |
380 | 380 |
show_value(cv, false) |
381 | 381 |
else |
382 |
value = issue.send(column.name) |
|
382 |
value = issue |
|
383 |
column.name.to_s.split(/\./).each do |column_name| |
|
384 |
value = value.__send__(column_name) |
|
385 |
break unless value |
|
386 |
end |
|
383 | 387 |
case column.name |
384 | 388 |
when :subject |
385 | 389 |
value = " " * level + value |
test/unit/lib/redmine/export/pdf/issues_pdf_test.rb | ||
---|---|---|
36 | 36 |
results = fetch_row_values(issue, query, 0) |
37 | 37 |
assert_equal ["2", "Add ingredients categories", "4.34"], results |
38 | 38 |
end |
39 | ||
40 |
def test_fetch_row_values_should_include_parent_issue_subject |
|
41 |
query = IssueQuery.new(:project => Project.find(1), :name => '_') |
|
42 |
query.column_names = [:subject, 'parent.subject'] |
|
43 |
issue = Issue.find(2) |
|
44 |
issue.parent = Issue.find(1) |
|
45 |
issue.save! |
|
46 | ||
47 |
results = fetch_row_values(issue, query, 0) |
|
48 |
assert_equal ["2", "Add ingredients categories", "Cannot print recipes"], results |
|
49 |
end |
|
39 | 50 |
end |