Commit b093f509 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Some code and doc improvements

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 32f1a719
...@@ -94,4 +94,8 @@ class GlobalMilestone ...@@ -94,4 +94,8 @@ class GlobalMilestone
def closed_merge_requests def closed_merge_requests
merge_requests.values_at("closed", "merged", "locked").compact.flatten merge_requests.values_at("closed", "merged", "locked").compact.flatten
end end
def complete?
total_items_count == closed_items_count
end
end end
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
Milestone #{@milestone.title} Milestone #{@milestone.title}
%hr %hr
- if (@milestone.total_items_count == @milestone.closed_items_count) && @milestone.active? - if @milestone.complete? && @milestone.active?
.alert.alert-success .alert.alert-success
%span All issues for this milestone are closed. You may close the milestone now. %span All issues for this milestone are closed. You may close the milestone now.
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
= link_to 'Reopen Milestone', group_milestone_path(@group, @milestone.safe_title, title: @milestone.title, milestone: {state_event: :activate }), method: :put, class: "btn btn-sm btn-grouped btn-reopen" = link_to 'Reopen Milestone', group_milestone_path(@group, @milestone.safe_title, title: @milestone.title, milestone: {state_event: :activate }), method: :put, class: "btn btn-sm btn-grouped btn-reopen"
%hr %hr
- if (@milestone.total_items_count == @milestone.closed_items_count) && @milestone.active? - if @milestone.complete? && @milestone.active?
.alert.alert-success .alert.alert-success
%span All issues for this milestone are closed. You may close the milestone now. %span All issues for this milestone are closed. You may close the milestone now.
......
# Milestones # Milestones
Milestone allows you to group issues and set due date for it. Milestones allow you to organize issues and merge requests into a cohesive group, optionally setting a due date.
Milestone is created per project. A common use is keeping track of an upcoming software version. Milestones are created per-project.
![milestone form](milestones/form.png) ![milestone form](milestones/form.png)
## Groups and milestones ## Groups and milestones
You can create milestone with single form for several projects that belongs to the same group. You can create a milestone for several projects in the same group simultaneously.
On the group milestones page you will be able to see this milestones grouped together by name. On the group's milestones page, you will be able to see the status of that milestone across all of the selected projects.
![group milestone form](milestones/group_form.png) ![group milestone form](milestones/group_form.png)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment