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
35279263
Commit
35279263
authored
Jan 28, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
3ff5c642
bbf6e65d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
1 deletion
+60
-1
app/views/projects/issues/show.html.haml
app/views/projects/issues/show.html.haml
+4
-1
changelogs/unreleased/36445-better-indication-that-an-issue-has-been-moved-or-marked-as-duplicated.yml
...-that-an-issue-has-been-moved-or-marked-as-duplicated.yml
+5
-0
spec/views/projects/issues/show.html.haml_spec.rb
spec/views/projects/issues/show.html.haml_spec.rb
+51
-0
No files found.
app/views/projects/issues/show.html.haml
View file @
35279263
...
...
@@ -15,7 +15,10 @@
.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
Closed
-
if
@issue
.
moved?
=
_
(
"Closed (moved)"
)
-
else
=
_
(
"Closed"
)
.issuable-status-box.status-box.status-box-open
{
class:
issue_button_visibility
(
@issue
,
true
)
}
=
sprite_icon
(
'issue-open-m'
,
size:
16
,
css_class:
'd-block d-sm-none'
)
%span
.d-none.d-sm-block
Open
...
...
changelogs/unreleased/36445-better-indication-that-an-issue-has-been-moved-or-marked-as-duplicated.yml
0 → 100644
View file @
35279263
---
title
:
Indicate on Issue Status if an Issue was Moved
merge_request
:
24470
author
:
type
:
added
spec/views/projects/issues/show.html.haml_spec.rb
0 → 100644
View file @
35279263
# frozen_string_literal: true
require
'spec_helper'
describe
'projects/issues/show'
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:issue
)
{
create
(
:issue
,
project:
project
,
author:
user
)
}
let
(
:user
)
{
create
(
:user
)
}
before
do
assign
(
:project
,
project
)
assign
(
:issue
,
issue
)
assign
(
:noteable
,
issue
)
stub_template
'shared/issuable/_sidebar'
=>
''
stub_template
'projects/issues/_discussion'
=>
''
allow
(
view
).
to
receive
(
:issuable_meta
).
and_return
(
''
)
end
context
'when the issue is closed'
do
before
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
)
render
expect
(
rendered
).
to
have_selector
(
'.status-box-issue-closed:not(.hidden)'
,
text:
'Closed (moved)'
)
end
it
'shows "Closed" if an issue has not been moved'
do
render
expect
(
rendered
).
to
have_selector
(
'.status-box-issue-closed:not(.hidden)'
,
text:
'Closed'
)
end
end
context
'when the issue is open'
do
before
do
allow
(
issue
).
to
receive
(
:closed?
).
and_return
(
false
)
allow
(
issue
).
to
receive
(
:disscussion_locked
).
and_return
(
false
)
end
it
'shows "Open" if an issue has been moved'
do
render
expect
(
rendered
).
to
have_selector
(
'.status-box-open:not(.hidden)'
,
text:
'Open'
)
end
end
end
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