Projects with completed actions may be blocked

Currently, a project cannot be blocked if at least one completed
action exists. This was introduced in
acab98d4c7,
and I assume this change was not intended
This commit is contained in:
Carsten Otto 2015-04-12 01:07:54 +02:00 committed by Dan Rice
parent ebec4f089d
commit 67ced62096
2 changed files with 4 additions and 2 deletions

View file

@ -109,7 +109,7 @@ class Project < ActiveRecord::Base
## mutually exclusive for stalled and blocked
# blocked is uncompleted project with deferred or pending todos, but no next actions
return false if self.completed?
return !self.todos.deferred_or_blocked.empty? && self.todos.not_deferred_or_blocked.empty?
return !self.todos.deferred_or_blocked.empty? && self.todos.active.empty?
end
def stalled?