diff options
author | Marin Jankovski <marin@gitlab.com> | 2014-07-14 15:25:09 +0200 |
---|---|---|
committer | Marin Jankovski <marin@gitlab.com> | 2014-07-14 15:25:09 +0200 |
commit | 275a5281d5f35bf2243a0b5814b8fb83f1561105 (patch) | |
tree | 309df8f87702e59f4bf24ac433bfdfa60092297a /app/models/group_milestone.rb | |
parent | d9bc57d18ec3d4ad0b0d8b223a67e496bc81ac88 (diff) | |
download | gitlab-ce-275a5281d5f35bf2243a0b5814b8fb83f1561105.tar.gz |
Milestone is closed only if all milestones are closed.
Diffstat (limited to 'app/models/group_milestone.rb')
-rw-r--r-- | app/models/group_milestone.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/group_milestone.rb b/app/models/group_milestone.rb index 013f8db00a7..33915313789 100644 --- a/app/models/group_milestone.rb +++ b/app/models/group_milestone.rb @@ -50,10 +50,10 @@ class GroupMilestone def state state = milestones.map { |milestone| milestone.state } - if state.count('active') == state.size - 'active' - else + if state.count('closed') == state.size 'closed' + else + 'active' end end |