Defect #33273 » 33273_4.0.8.patch
app/helpers/queries_helper.rb | ||
---|---|---|
155 | 155 | |
156 | 156 |
def total_tag(column, value) |
157 | 157 |
label = content_tag('span', "#{column.caption}:") |
158 |
value = if [:hours, :spent_hours, :total_spent_hours, :estimated_hours].include? column.name |
|
158 |
value = if [:hours, :spent_hours, :total_spent_hours, :estimated_hours, :total_estimated_hours].include? column.name
|
|
159 | 159 |
format_hours(value) |
160 | 160 |
else |
161 | 161 |
format_object(value) |
... | ... | |
226 | 226 |
content_tag('span', |
227 | 227 |
value.to_s(item) {|other| link_to_issue(other, :subject => false, :tracker => false)}.html_safe, |
228 | 228 |
:class => value.css_classes_for(item)) |
229 |
when :hours, :estimated_hours |
|
229 |
when :hours, :estimated_hours, :total_estimated_hours
|
|
230 | 230 |
format_hours(value) |
231 | 231 |
when :spent_hours |
232 | 232 |
link_to_if(value > 0, format_hours(value), project_time_entries_path(item.project, :issue_id => "#{item.id}")) |
test/functional/issues_controller_test.rb | ||
---|---|---|
1595 | 1595 |
end |
1596 | 1596 |
end |
1597 | 1597 | |
1598 |
def test_index_should_respect_timespan_format |
|
1599 |
with_settings :timespan_format => 'minutes' do |
|
1600 |
get( |
|
1601 |
:index, |
|
1602 |
:params => { |
|
1603 |
:set_filter => 1, |
|
1604 |
:c => %w(estimated_hours total_estimated_hours spent_hours total_spent_hours) |
|
1605 |
} |
|
1606 |
) |
|
1607 |
assert_select 'table.issues tr#issue-1 td.estimated_hours', :text => '200:00' |
|
1608 |
assert_select 'table.issues tr#issue-1 td.total_estimated_hours', :text => '200:00' |
|
1609 |
assert_select 'table.issues tr#issue-1 td.spent_hours', :text => '154:15' |
|
1610 |
assert_select 'table.issues tr#issue-1 td.total_spent_hours', :text => '154:15' |
|
1611 |
end |
|
1612 |
end |
|
1613 | ||
1598 | 1614 |
def test_show_by_anonymous |
1599 | 1615 |
get :show, :params => { |
1600 | 1616 |
:id => 1 |
... | ... | |
1818 | 1834 |
with_settings :date_format => '%d/%m/%Y' do |
1819 | 1835 |
issue = Issue.generate!(:start_date => '2018-11-29', :due_date => '2018-12-01') |
1820 | 1836 |
IssueRelation.create!(:issue_from => Issue.find(1), :issue_to => issue, :relation_type => 'relates') |
1821 |
|
|
1837 | ||
1822 | 1838 |
get :show, :params => { |
1823 | 1839 |
:id => 1 |
1824 | 1840 |
} |
1825 | 1841 |
assert_response :success |
1826 |
|
|
1842 | ||
1827 | 1843 |
assert_select '#relations td.start_date', :text => '29/11/2018' |
1828 | 1844 |
assert_select '#relations td.due_date', :text => '01/12/2018' |
1829 | 1845 |
end |
- « Previous
- 1
- 2
- Next »