diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-06-14 10:47:04 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-06-14 10:47:04 +0000 |
commit | 76eeb64d1aa89c7a3c9435bb302cf032ca39f1b6 (patch) | |
tree | ea068313a5cbddefae493d27be1feb46599d1bbe /test | |
parent | c804151780036f318350fdb9176c56f72aa9c2e6 (diff) | |
download | redmine-76eeb64d1aa89c7a3c9435bb302cf032ca39f1b6.tar.gz redmine-76eeb64d1aa89c7a3c9435bb302cf032ca39f1b6.zip |
Fixed that time report raises a SQL error if there are multiple CustomValue for a time entry (#11160).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9831 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/time_entry_reports_controller_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/functional/time_entry_reports_controller_test.rb b/test/functional/time_entry_reports_controller_test.rb index 44a5037d8..9803160f5 100644 --- a/test/functional/time_entry_reports_controller_test.rb +++ b/test/functional/time_entry_reports_controller_test.rb @@ -80,6 +80,16 @@ class TimeEntryReportsControllerTest < ActionController::TestCase assert_equal "162.90", "%.2f" % assigns(:report).total_hours end + def test_report_custom_field_criteria_with_multiple_values + field = TimeEntryCustomField.create!(:name => 'multi', :field_format => 'list', :possible_values => ['value1', 'value2']) + entry = TimeEntry.create!(:project => Project.find(1), :hours => 1, :activity_id => 10, :user => User.find(2), :spent_on => Date.today) + CustomValue.create!(:customized => entry, :custom_field => field, :value => 'value1') + CustomValue.create!(:customized => entry, :custom_field => field, :value => 'value2') + + get :report, :project_id => 1, :columns => 'day', :criteria => ["cf_#{field.id}"] + assert_response :success + end + def test_report_one_day get :report, :project_id => 1, :columns => 'day', :from => "2007-03-23", :to => "2007-03-23", :criteria => ["member", "activity"] assert_response :success |