diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-01-09 09:10:24 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-01-09 09:10:24 +0000 |
commit | 5e5506587e95b1981b7e913bf4e6b7b61c304bde (patch) | |
tree | 6ef39cbcad19ac2df552ab9a99ad78c5a3c0579c /app/models/version.rb | |
parent | f5702c35df38c5609b5956fe86ef176cb0643ed0 (diff) | |
download | redmine-5e5506587e95b1981b7e913bf4e6b7b61c304bde.tar.gz redmine-5e5506587e95b1981b7e913bf4e6b7b61c304bde.zip |
Closed versions should be marked as completed (#21433).
git-svn-id: http://svn.redmine.org/redmine/trunk@15019 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/version.rb')
-rw-r--r-- | app/models/version.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/version.rb b/app/models/version.rb index 7d3387a63..1d4f4dac1 100644 --- a/app/models/version.rb +++ b/app/models/version.rb @@ -102,9 +102,9 @@ class Version < ActiveRecord::Base status == 'open' end - # Returns true if the version is completed: due date reached and no open issues + # Returns true if the version is completed: closed or due date reached and no open issues def completed? - effective_date && (effective_date < Date.today) && (open_issues_count == 0) + closed? || (effective_date && (effective_date < Date.today) && (open_issues_count == 0)) end def behind_schedule? |