Feature #35797 ยป 0001-Don-t-display-0.00-in-the-Spent-time-and-Total-spent.patch
| app/helpers/queries_helper.rb | ||
|---|---|---|
| 275 | 275 |
when :hours, :estimated_hours, :total_estimated_hours, :estimated_remaining_hours |
| 276 | 276 |
format_hours(value) |
| 277 | 277 |
when :spent_hours |
| 278 |
link_to_if(value > 0, format_hours(value), project_time_entries_path(item.project, :issue_id => "#{item.id}"))
|
|
| 278 |
value > 0 ? link_to(format_hours(value), project_time_entries_path(item.project, :issue_id => "#{item.id}")) : ''
|
|
| 279 | 279 |
when :total_spent_hours |
| 280 |
link_to_if(value > 0, format_hours(value), project_time_entries_path(item.project, :issue_id => "~#{item.id}"))
|
|
| 280 |
value > 0 ? link_to(format_hours(value), project_time_entries_path(item.project, :issue_id => "~#{item.id}")) : ''
|
|
| 281 | 281 |
when :attachments |
| 282 | 282 |
value.to_a.map {|a| format_object(a)}.join(" ").html_safe
|
| 283 | 283 |
when :watcher_users |
| test/functional/issues_controller_test.rb | ||
|---|---|---|
| 1390 | 1390 |
} |
| 1391 | 1391 |
) |
| 1392 | 1392 |
assert_response :success |
| 1393 |
assert_equal ['4:00', '3:00', '0:00'], columns_values_in_list('spent_hours').first(3)
|
|
| 1393 |
assert_equal ['4:00', '3:00', ''], columns_values_in_list('spent_hours').first(3)
|
|
| 1394 | 1394 |
Project.find(3).disable_module!(:time_tracking) |
| 1395 | 1395 |
get( |
| 1396 | 1396 |
:index, |
| ... | ... | |
| 1400 | 1400 |
} |
| 1401 | 1401 |
) |
| 1402 | 1402 |
assert_response :success |
| 1403 |
assert_equal ['3:00', '0:00', '0:00'], columns_values_in_list('spent_hours').first(3)
|
|
| 1403 |
assert_equal ['3:00', '', ''], columns_values_in_list('spent_hours').first(3)
|
|
| 1404 | 1404 |
end |
| 1405 | 1405 |
def test_index_sort_by_total_spent_hours |
| ... | ... | |
| 1624 | 1624 |
} |
| 1625 | 1625 |
) |
| 1626 | 1626 |
assert_select 'table.issues tr#issue-3 td.spent_hours', :text => '1:00' |
| 1627 |
assert_select 'table.issues tr#issue-2 td.spent_hours', :text => '' |
|
| 1627 | 1628 |
end |
| 1628 | 1629 |
def test_index_with_total_spent_hours_column |
| ... | ... | |
| 1636 | 1637 |
} |
| 1637 | 1638 |
) |
| 1638 | 1639 |
assert_select 'table.issues tr#issue-3 td.total_spent_hours', :text => '1:00' |
| 1640 |
assert_select 'table.issues tr#issue-2 td.total_spent_hours', :text => '' |
|
| 1639 | 1641 |
end |
| 1640 | 1642 |
def test_index_with_total_estimated_hours_column |