BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
4bfd06e6
Commit
4bfd06e6
authored
Jun 08, 2017
by
Adam Niedzielski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display issue state in issue links section of merge request widget
parent
4a228954
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
2 deletions
+28
-2
merge_request_presenter.rb
app/presenters/merge_request_presenter.rb
+14
-2
33381-display-issue-state-in-mr-widget-issue-links.yml
...ed/33381-display-issue-state-in-mr-widget-issue-links.yml
+4
-0
merge_request_presenter_spec.rb
spec/presenters/merge_request_presenter_spec.rb
+10
-0
No files found.
app/presenters/merge_request_presenter.rb
View file @
4bfd06e6
...
...
@@ -110,12 +110,24 @@ class MergeRequestPresenter < Gitlab::View::Presenter::Delegated
end
def
closing_issues_links
markdown
issues_sentence
(
project
,
closing_issues
),
pipeline: :gfm
,
author:
author
,
project:
project
markdown
(
issues_sentence
(
project
,
closing_issues
),
pipeline: :gfm
,
author:
author
,
project:
project
,
issuable_state_filter_enabled:
true
)
end
def
mentioned_issues_links
mentioned_issues
=
issues_mentioned_but_not_closing
(
current_user
)
markdown
issues_sentence
(
project
,
mentioned_issues
),
pipeline: :gfm
,
author:
author
,
project:
project
markdown
(
issues_sentence
(
project
,
mentioned_issues
),
pipeline: :gfm
,
author:
author
,
project:
project
,
issuable_state_filter_enabled:
true
)
end
def
assign_to_closing_issues_link
...
...
changelogs/unreleased/33381-display-issue-state-in-mr-widget-issue-links.yml
0 → 100644
View file @
4bfd06e6
---
title
:
Display issue state in issue links section of merge request widget
merge_request
:
12021
author
:
spec/presenters/merge_request_presenter_spec.rb
View file @
4bfd06e6
...
...
@@ -132,6 +132,11 @@ describe MergeRequestPresenter do
it
'does not present related issues links'
do
is_expected
.
not_to
match
(
"
#{
project
.
full_path
}
/issues/
#{
issue_b
.
iid
}
"
)
end
it
'appends status when closing issue is already closed'
do
issue_a
.
close
is_expected
.
to
match
(
'(closed)'
)
end
end
describe
'#mentioned_issues_links'
do
...
...
@@ -147,6 +152,11 @@ describe MergeRequestPresenter do
it
'does not present closing issues links'
do
is_expected
.
not_to
match
(
"
#{
project
.
full_path
}
/issues/
#{
issue_a
.
iid
}
"
)
end
it
'appends status when mentioned issue is already closed'
do
issue_b
.
close
is_expected
.
to
match
(
'(closed)'
)
end
end
describe
'#assign_to_closing_issues_link'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment