diff options
author | Rémy Coutable <remy@rymai.me> | 2016-06-13 08:47:10 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-06-13 08:47:10 +0000 |
commit | 65df6bcb898e067e380658431136b5ef9aaba3b0 (patch) | |
tree | 5881ba15f712b1f6cbc6733df0ef8d2089124cac | |
parent | 06a99cf7ea82105a182c2805ea05266e5ce6c0a2 (diff) | |
parent | c7941acd1e410fedb431efe13dc3b74dfa7f9f8a (diff) | |
download | gitlab-ce-65df6bcb898e067e380658431136b5ef9aaba3b0.tar.gz |
Merge branch '18446-when-this-merge-request-is-accepted-this-issue-will-be-closed-automatically-rendered-twice' into 'master'
Resolve ""When this merge request is accepted, this issue will be closed automatically" rendered twice"
## What does this MR do?
1. Only show the above text when there is an MR that will close the issue, and even then, only show it once.
2. Apply 98f147e84d2bd8f2278452ac0852118452c76d4a to a bunch of other places that need it.
## Are there points in the code the reviewer needs to double check?
¯\_(ツ)_/¯
## Why was this MR needed?
Some pages were broken.
## What are the relevant issue numbers?
Fixes #18446.
## Screenshots (if relevant)
Before:
![image](/uploads/23cfaf95b7c798f22963ff67f78a803b/image.png)
After:
![image](/uploads/ca9c538069ba52e53858c69387738521/image.png)
## Does this MR meet the acceptance criteria?
- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- [ ] Tests
- [ ] Added for this feature/bug
- [ ] All builds are passing
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
See merge request !4594
-rw-r--r-- | app/views/dashboard/issues.atom.builder | 4 | ||||
-rw-r--r-- | app/views/groups/issues.atom.builder | 4 | ||||
-rw-r--r-- | app/views/projects/issues/_merge_requests.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/issues/index.atom.builder | 4 | ||||
-rw-r--r-- | app/views/shared/_merge_requests.html.haml | 2 |
5 files changed, 7 insertions, 9 deletions
diff --git a/app/views/dashboard/issues.atom.builder b/app/views/dashboard/issues.atom.builder index 83c0c6da21b..0404d0728ea 100644 --- a/app/views/dashboard/issues.atom.builder +++ b/app/views/dashboard/issues.atom.builder @@ -4,7 +4,7 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://sear xml.link href: issues_dashboard_url(format: :atom, private_token: current_user.try(:private_token)), rel: "self", type: "application/atom+xml" xml.link href: issues_dashboard_url, rel: "alternate", type: "text/html" xml.id issues_dashboard_url - xml.updated @issues.first.created_at.xmlschema if @issues.any? + xml.updated @issues.first.created_at.xmlschema if @issues.reorder(nil).any? - xml << render(partial: 'issues/issue', collection: @issues) if @issues.any? + xml << render(partial: 'issues/issue', collection: @issues) if @issues.reorder(nil).any? end diff --git a/app/views/groups/issues.atom.builder b/app/views/groups/issues.atom.builder index c19671295af..b1628040325 100644 --- a/app/views/groups/issues.atom.builder +++ b/app/views/groups/issues.atom.builder @@ -4,7 +4,7 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://sear xml.link href: issues_group_url(format: :atom, private_token: current_user.try(:private_token)), rel: "self", type: "application/atom+xml" xml.link href: issues_group_url, rel: "alternate", type: "text/html" xml.id issues_group_url - xml.updated @issues.first.created_at.xmlschema if @issues.any? + xml.updated @issues.first.created_at.xmlschema if @issues.reorder(nil).any? - xml << render(partial: 'issues/issue', collection: @issues) if @issues.any? + xml << render(partial: 'issues/issue', collection: @issues) if @issues.reorder(nil).any? end diff --git a/app/views/projects/issues/_merge_requests.html.haml b/app/views/projects/issues/_merge_requests.html.haml index 75f36579b11..d8075371853 100644 --- a/app/views/projects/issues/_merge_requests.html.haml +++ b/app/views/projects/issues/_merge_requests.html.haml @@ -24,8 +24,6 @@ MERGED - elsif merge_request.closed? CLOSED - %li - = render partial: 'projects/issues/closed_by_box', locals: {merge_request_count: @merge_requests.count} - if @closed_by_merge_requests.present? %li = render partial: 'projects/issues/closed_by_box', locals: {merge_request_count: @merge_requests.count} diff --git a/app/views/projects/issues/index.atom.builder b/app/views/projects/issues/index.atom.builder index 7ad7c9c87e8..36957560de0 100644 --- a/app/views/projects/issues/index.atom.builder +++ b/app/views/projects/issues/index.atom.builder @@ -4,7 +4,7 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://sear xml.link href: namespace_project_issues_url(@project.namespace, @project, format: :atom, private_token: current_user.try(:private_token)), rel: "self", type: "application/atom+xml" xml.link href: namespace_project_issues_url(@project.namespace, @project), rel: "alternate", type: "text/html" xml.id namespace_project_issues_url(@project.namespace, @project) - xml.updated @issues.first.created_at.xmlschema if @issues.any? + xml.updated @issues.first.created_at.xmlschema if @issues.reorder(nil).any? - xml << render(partial: 'issues/issue', collection: @issues) if @issues.any? + xml << render(partial: 'issues/issue', collection: @issues) if @issues.reorder(nil).any? end diff --git a/app/views/shared/_merge_requests.html.haml b/app/views/shared/_merge_requests.html.haml index e74fc36c797..ca3178395c1 100644 --- a/app/views/shared/_merge_requests.html.haml +++ b/app/views/shared/_merge_requests.html.haml @@ -1,4 +1,4 @@ -- if @merge_requests.any? +- if @merge_requests.reorder(nil).any? - @merge_requests.group_by(&:target_project).each do |group| .panel.panel-default.panel-small - project = group[0] |