Commit c51d508e authored by Jacob Schatz's avatar Jacob Schatz Committed by Robert Speicher

Merge branch 'milestones-show-mrs' into 'master'

Add merge request data to the progress information on Milestones pages.

## What does this MR do?

Adds data about merge requests to the Milestone show view. It previously only showed something like `3 issues: 2 open and 1 closed 20% complete`, now it shows `3 issues: 2 open and 1 closed 2 merge requests: 2 open and 0 merged 20% complete`.

## Are there points in the code the reviewer needs to double check?

I don't think so.

## Why was this MR needed?

The milestone progress % didn't accurately reflect the open/merged MRs.

## What are the relevant issue numbers?

Fixes #13980

## Screenshots (if relevant)

Before:

![Screen_Shot_2016-06-16_at_2.12.57_PM](/uploads/99a044ea918b23fe93cef3305c21086e/Screen_Shot_2016-06-16_at_2.12.57_PM.png)

After:

![Screen_Shot_2016-06-16_at_2.12.38_PM](/uploads/be17e723b9c9bbe33099d1f0e94192d0/Screen_Shot_2016-06-16_at_2.12.38_PM.png)

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

cc: @jschatz1

See merge request !4719
parent 3353e371
...@@ -26,6 +26,7 @@ v 8.9.0 (unreleased) ...@@ -26,6 +26,7 @@ v 8.9.0 (unreleased)
- Added descriptions to notification settings dropdown - Added descriptions to notification settings dropdown
- Improve note validation to prevent errors when creating invalid note via API - Improve note validation to prevent errors when creating invalid note via API
- Reduce number of fog gem dependencies - Reduce number of fog gem dependencies
- Add number of merge requests for a given milestone to the milestones view.
- Implement a fair usage of shared runners - Implement a fair usage of shared runners
- Remove project notification settings associated with deleted projects - Remove project notification settings associated with deleted projects
- Fix 404 page when viewing TODOs that contain milestones or labels in different projects - Fix 404 page when viewing TODOs that contain milestones or labels in different projects
......
...@@ -10,6 +10,13 @@ ...@@ -10,6 +10,13 @@
open and open and
%strong= milestone.issues_visible_to_user(current_user).closed.size %strong= milestone.issues_visible_to_user(current_user).closed.size
closed closed
%strong= milestone.merge_requests.size
merge requests:
%span.milestone-stat
%strong= milestone.merge_requests.opened.size
open and
%strong= milestone.merge_requests.merged.size
merged
%span.milestone-stat %span.milestone-stat
%strong== #{milestone.percent_complete(current_user)}% %strong== #{milestone.percent_complete(current_user)}%
complete complete
......
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