diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2024-05-02 20:58:03 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2024-05-02 20:58:03 +0000 |
commit | cd8d4fe444328925a71b9018dac8b6194801d547 (patch) | |
tree | 51988a091862eb952445eaa03f9a20e69df26805 /test/unit | |
parent | 3433731585b6126208cd855b46115d18d249fb1f (diff) | |
download | redmine-cd8d4fe444328925a71b9018dac8b6194801d547.tar.gz redmine-cd8d4fe444328925a71b9018dac8b6194801d547.zip |
Progress of version should be calculated the same way as parent tasks (#24457, #4682).
git-svn-id: https://svn.redmine.org/redmine/trunk@22803 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/version_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/unit/version_test.rb b/test/unit/version_test.rb index 45c5bed37..4b20c05a0 100644 --- a/test/unit/version_test.rb +++ b/test/unit/version_test.rb @@ -117,6 +117,16 @@ class VersionTest < ActiveSupport::TestCase assert_progress_equal (100.0)/3, v.closed_percent end + def test_progress_should_consider_closed_issues_with_0h_estimated_as_completed + project = Project.find(1) + closed = IssueStatus.where(:is_closed => true).first + v = Version.create!(:project => project, :name => 'Progress') + add_issue(v, :done_ratio => 100, :estimated_hours => 0) + add_issue(v, :done_ratio => 100, :estimated_hours => 0, :status => closed) + assert_progress_equal 100, v.completed_percent + assert_progress_equal 50, v.closed_percent + end + def test_progress_should_consider_estimated_hours_to_weight_issues project = Project.find(1) v = Version.create!(:project => project, :name => 'Progress') |