summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2017-03-29 15:26:24 -0500
committerMike Greiling <mike@pixelcog.com>2017-03-29 15:26:24 -0500
commit48a30a7ab38932d14dfd4136960983efe76fa630 (patch)
tree045bd6eec3dffe85e7f5eb0585effd9a13675215
parent3671437769e41b2f1a6260c66a6cbcea990598c2 (diff)
downloadgitlab-ce-48a30a7ab38932d14dfd4136960983efe76fa630.tar.gz
prever #count over #size when calculating issue/mr totals
-rw-r--r--app/views/shared/milestones/_sidebar.html.haml24
1 files changed, 12 insertions, 12 deletions
diff --git a/app/views/shared/milestones/_sidebar.html.haml b/app/views/shared/milestones/_sidebar.html.haml
index 6430c5f6352..2810f1377b2 100644
--- a/app/views/shared/milestones/_sidebar.html.haml
+++ b/app/views/shared/milestones/_sidebar.html.haml
@@ -68,10 +68,10 @@
.sidebar-collapsed-icon
%strong
= icon('hashtag', 'aria-hidden': 'true')
- %span= milestone.issues_visible_to_user(current_user).size
+ %span= milestone.issues_visible_to_user(current_user).count
.title.hide-collapsed
Issues
- %span.badge= milestone.issues_visible_to_user(current_user).size
+ %span.badge= milestone.issues_visible_to_user(current_user).count
- if project && can?(current_user, :create_issue, project)
= link_to new_namespace_project_issue_path(project.namespace, project, issue: { milestone_id: milestone.id }), class: "pull-right", title: "New Issue" do
New issue
@@ -79,44 +79,44 @@
%span.milestone-stat
= link_to milestones_browse_issuables_path(milestone, type: :issues) do
Open:
- = milestone.issues_visible_to_user(current_user).opened.size
+ = milestone.issues_visible_to_user(current_user).opened.count
%span.milestone-stat
= link_to milestones_browse_issuables_path(milestone, type: :issues, state: 'closed') do
Closed:
- = milestone.issues_visible_to_user(current_user).closed.size
+ = milestone.issues_visible_to_user(current_user).closed.count
.block
.sidebar-collapsed-icon
%strong
= icon('exclamation', 'aria-hidden': 'true')
- %span= milestone.issues_visible_to_user(current_user).size
+ %span= milestone.issues_visible_to_user(current_user).count
.title.hide-collapsed
Merge requests
- %span.badge= milestone.merge_requests.size
+ %span.badge= milestone.merge_requests.count
.value.hide-collapsed.bold
- if !project || can?(current_user, :read_merge_request, project)
%span.milestone-stat
= link_to milestones_browse_issuables_path(milestone, type: :merge_requests) do
Open:
- = milestone.merge_requests.opened.size
+ = milestone.merge_requests.opened.count
%span.milestone-stat
= link_to milestones_browse_issuables_path(milestone, type: :merge_requests, state: 'closed') do
Closed:
- = milestone.merge_requests.closed.size
+ = milestone.merge_requests.closed.count
%span.milestone-stat
= link_to milestones_browse_issuables_path(milestone, type: :merge_requests, state: 'merged') do
Merged:
- = milestone.merge_requests.merged.size
+ = milestone.merge_requests.merged.count
- else
%span.milestone-stat
Open:
- = milestone.merge_requests.opened.size
+ = milestone.merge_requests.opened.count
%span.milestone-stat
Closed:
- = milestone.merge_requests.closed.size
+ = milestone.merge_requests.closed.count
%span.milestone-stat
Merged:
- = milestone.merge_requests.merged.size
+ = milestone.merge_requests.merged.count
- milestone_ref = milestone.try(:to_reference, full: true)
- if milestone_ref.present?