Milestone is closed only if all milestones are closed.

This commit is contained in:
Marin Jankovski 2014-07-14 15:25:09 +02:00
parent d9bc57d18e
commit 275a5281d5

View file

@ -50,10 +50,10 @@ class GroupMilestone
def state def state
state = milestones.map { |milestone| milestone.state } state = milestones.map { |milestone| milestone.state }
if state.count('active') == state.size if state.count('closed') == state.size
'active'
else
'closed' 'closed'
else
'active'
end end
end end