Project

General

Profile

Defect #32896 » 0001-Fix-totals-not-displayed-in-projects-list-view.patch

Marius BĂLTEANU, 2020-01-27 23:08

View differences:

app/views/projects/_list.html.erb
<%= render_query_totals(@query) %>
<div class="autoscroll">
<table class="list projects odd-even <%= @query.css_classes %>">
<thead>
public/stylesheets/application.css
.query-totals {text-align:right;}
.query-totals>span:not(:first-child) {margin-left:0.6em;}
.query-totals .value {font-weight:bold;}
body.controller-issues .query-totals {margin-top:-2.3em;}
.query-totals {margin-top:-2.3em;}
body.controller-timelog .query-totals {margin-top:initial;}
td.center {text-align:center;}
test/functional/projects_controller_test.rb
)
end
def test_index_with_int_custom_field_total
@request.session[:user_id] = 1
field = ProjectCustomField.generate!(:field_format => 'int')
CustomValue.create!(:customized => Project.find(1), :custom_field => field, :value => '2')
CustomValue.create!(:customized => Project.find(2), :custom_field => field, :value => '7')
get(
:index,
:params => {
:display_type => 'list',
:t => ["cf_#{field.id}"]
}
)
assert_response :success
assert_select '.query-totals'
assert_select ".total-for-cf-#{field.id} span.value", :text => '9'
end
def test_autocomplete_js
get(
:autocomplete,
(2-2/3)