summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarin Jankovski <marin@gitlab.com>2014-07-14 15:25:09 +0200
committerMarin Jankovski <marin@gitlab.com>2014-07-14 15:25:09 +0200
commit275a5281d5f35bf2243a0b5814b8fb83f1561105 (patch)
tree309df8f87702e59f4bf24ac433bfdfa60092297a
parentd9bc57d18ec3d4ad0b0d8b223a67e496bc81ac88 (diff)
downloadgitlab-ce-275a5281d5f35bf2243a0b5814b8fb83f1561105.tar.gz
Milestone is closed only if all milestones are closed.
-rw-r--r--app/models/group_milestone.rb6
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