Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
37b9173b
Commit
37b9173b
authored
Feb 15, 2019
by
Andrew Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make "moved" Link to Moved Issue
The text "moved" now links to the issue the closed issue was moved to.
parent
c8bf9f78
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
9 deletions
+34
-9
app/assets/stylesheets/framework/issue_box.scss
app/assets/stylesheets/framework/issue_box.scss
+5
-0
app/views/projects/issues/show.html.haml
app/views/projects/issues/show.html.haml
+5
-2
changelogs/unreleased/57784-make-closed-duplicate-and-closed-moved-button-a-link-to-target.yml
...ed-duplicate-and-closed-moved-button-a-link-to-target.yml
+5
-0
locale/gitlab.pot
locale/gitlab.pot
+3
-3
spec/views/projects/issues/show.html.haml_spec.rb
spec/views/projects/issues/show.html.haml_spec.rb
+16
-4
No files found.
app/assets/stylesheets/framework/issue_box.scss
View file @
37b9173b
...
...
@@ -32,6 +32,11 @@
&
.status-box-issue-closed
,
&
.status-box-mr-merged
{
background-color
:
$blue-500
;
a
{
color
:
inherit
;
text-decoration
:
underline
;
}
}
&
.status-box-open
{
...
...
app/views/projects/issues/show.html.haml
View file @
37b9173b
...
...
@@ -14,9 +14,12 @@
.detail-page-header-body
.issuable-status-box.status-box.status-box-issue-closed
{
class:
issue_button_visibility
(
@issue
,
false
)
}
=
sprite_icon
(
'mobile-issue-close'
,
size:
16
,
css_class:
'd-block d-sm-none'
)
%span
.d-none.d-sm-block
.d-none.d-sm-block
-
if
@issue
.
moved?
=
_
(
"Closed (moved)"
)
-
moved_link_start
=
"<a href=
\"
#{
issue_path
(
@issue
.
moved_to
)
}
\"
>"
.
html_safe
-
moved_link_end
=
'</a>'
.
html_safe
=
s_
(
'IssuableStatus|Closed (%{moved_link_start}moved%{moved_link_end})'
).
html_safe
%
{
moved_link_start:
moved_link_start
,
moved_link_end:
moved_link_end
}
-
else
=
_
(
"Closed"
)
.issuable-status-box.status-box.status-box-open
{
class:
issue_button_visibility
(
@issue
,
true
)
}
...
...
changelogs/unreleased/57784-make-closed-duplicate-and-closed-moved-button-a-link-to-target.yml
0 → 100644
View file @
37b9173b
---
title
:
Add Link from Closed (moved) Issues to Moved Issue
merge_request
:
25300
author
:
type
:
added
locale/gitlab.pot
View file @
37b9173b
...
...
@@ -1542,9 +1542,6 @@ msgstr ""
msgid "Closed"
msgstr ""
msgid "Closed (moved)"
msgstr ""
msgid "ClusterIntegration| %{custom_domain_start}More information%{custom_domain_end}."
msgstr ""
...
...
@@ -4097,6 +4094,9 @@ msgstr ""
msgid "Invoke Time"
msgstr ""
msgid "IssuableStatus|Closed (%{moved_link_start}moved%{moved_link_end})"
msgstr ""
msgid "Issue"
msgstr ""
...
...
spec/views/projects/issues/show.html.haml_spec.rb
View file @
37b9173b
...
...
@@ -21,12 +21,24 @@ describe 'projects/issues/show' do
allow
(
issue
).
to
receive
(
:closed?
).
and_return
(
true
)
end
it
'shows "Closed (moved)" if an issue has been
moved'
do
allow
(
issue
).
to
receive
(
:moved?
).
and_return
(
true
)
context
'when the issue was
moved'
do
let
(
:new_issue
)
{
create
(
:issue
,
project:
project
,
author:
user
)
}
render
before
do
issue
.
moved_to
=
new_issue
end
it
'shows "Closed (moved)" if an issue has been moved'
do
render
expect
(
rendered
).
to
have_selector
(
'.status-box-issue-closed:not(.hidden)'
,
text:
'Closed (moved)'
)
end
it
'links "moved" to the new issue the original issue was moved to'
do
render
expect
(
rendered
).
to
have_selector
(
'.status-box-issue-closed:not(.hidden)'
,
text:
'Closed (moved)'
)
expect
(
rendered
).
to
have_selector
(
"a[href=
\"
#{
issue_path
(
new_issue
)
}
\"
]"
,
text:
'moved'
)
end
end
it
'shows "Closed" if an issue has not been moved'
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