GitLab steht wegen Wartungsarbeiten am Montag, den 10. Mai, zwischen 17:00 und 19:00 Uhr nicht zur Verfügung.

Commit 47b13698 authored by jplang's avatar jplang

Do not consider that versions that are due today are completed.

git-svn-id: https://svn.redmine.org/redmine/trunk@10397 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 7480bde8
......@@ -91,7 +91,7 @@ class Version < ActiveRecord::Base
# Returns true if the version is completed: due date reached and no open issues
def completed?
effective_date && (effective_date <= Date.today) && (open_issues_count == 0)
effective_date && (effective_date < Date.today) && (open_issues_count == 0)
end
def behind_schedule?
......
......@@ -119,6 +119,11 @@ class VersionTest < ActiveSupport::TestCase
assert_equal [v5, v3, v1, v2, v4], Version.sorted.all
end
def test_completed_should_be_false_when_due_today
version = Version.create!(:project_id => 1, :effective_date => Date.today, :name => 'Due today')
assert_equal false, version.completed?
end
context "#behind_schedule?" do
setup do
ProjectCustomField.destroy_all # Custom values are a mess to isolate in tests
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment