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
ad8d9050
Commit
ad8d9050
authored
Apr 30, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
825bebc6
5d5b9d57
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
0 additions
and
67 deletions
+0
-67
app/controllers/projects/issues_controller.rb
app/controllers/projects/issues_controller.rb
+0
-12
app/views/projects/issues/_merge_requests_status.html.haml
app/views/projects/issues/_merge_requests_status.html.haml
+0
-25
config/routes/project.rb
config/routes/project.rb
+0
-1
spec/javascripts/issue_spec.js
spec/javascripts/issue_spec.js
+0
-1
spec/views/projects/issues/_merge_requests_status.html.haml_spec.rb
.../projects/issues/_merge_requests_status.html.haml_spec.rb
+0
-28
No files found.
app/controllers/projects/issues_controller.rb
View file @
ad8d9050
...
...
@@ -132,18 +132,6 @@ class Projects::IssuesController < Projects::ApplicationController
render_conflict_response
end
def
referenced_merge_requests
@merge_requests
,
@closed_by_merge_requests
=
::
Issues
::
ReferencedMergeRequestsService
.
new
(
project
,
current_user
).
execute
(
issue
)
respond_to
do
|
format
|
format
.
json
do
render
json:
{
html:
view_to_html_string
(
'projects/issues/_merge_requests'
)
}
end
end
end
def
related_branches
@related_branches
=
Issues
::
RelatedBranchesService
.
new
(
project
,
current_user
).
execute
(
issue
)
...
...
app/views/projects/issues/_merge_requests_status.html.haml
deleted
100644 → 0
View file @
825bebc6
-
time_format
=
'%b %e, %Y %l:%M%P %Z%z'
-
if
merge_request
.
merged?
-
mr_status_date
=
merge_request
.
merged_at
-
mr_status_title
=
_
(
'Merged'
)
-
mr_status_icon
=
'merge'
-
mr_status_class
=
'merged'
-
elsif
merge_request
.
closed?
-
mr_status_date
=
merge_request
.
closed_event
&
.
created_at
-
mr_status_title
=
_
(
'Closed'
)
-
mr_status_icon
=
'issue-close'
-
mr_status_class
=
'closed'
-
else
-
mr_status_date
=
merge_request
.
created_at
-
mr_status_title
=
mr_status_date
?
_
(
'Opened'
)
:
_
(
'Open'
)
-
mr_status_icon
=
'issue-open-m'
-
mr_status_class
=
'open'
-
if
mr_status_date
-
mr_status_tooltip
=
"<div><span class=
\"
bold
\"
>
#{
mr_status_title
}
</span>
#{
time_ago_in_words
(
mr_status_date
)
}
ago</div><span class=
\"
text-tertiary
\"
>
#{
l
(
mr_status_date
.
to_time
,
format:
time_format
)
}
</span>"
-
else
-
mr_status_tooltip
=
"<div><span class=
\"
bold
\"
>
#{
mr_status_title
}
</span></div>"
%span
.mr-status-wrapper.suggestion-help-hover
{
class:
css_class
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
html:
'true'
,
title:
mr_status_tooltip
}
}
=
sprite_icon
(
mr_status_icon
,
size:
16
,
css_class:
"merge-request-status
#{
mr_status_class
}
"
)
config/routes/project.rb
View file @
ad8d9050
...
...
@@ -435,7 +435,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
post
:toggle_subscription
post
:mark_as_spam
post
:move
get
:referenced_merge_requests
get
:related_branches
get
:can_create_branch
get
:realtime_changes
...
...
spec/javascripts/issue_spec.js
View file @
ad8d9050
...
...
@@ -113,7 +113,6 @@ describe('Issue', function() {
mock
=
new
MockAdapter
(
axios
);
mock
.
onGet
(
/
(
.*
)\/
related_branches$/
).
reply
(
200
,
{});
mock
.
onGet
(
/
(
.*
)\/
referenced_merge_requests$/
).
reply
(
200
,
{});
findElements
(
isIssueInitiallyOpen
);
this
.
issue
=
new
Issue
();
...
...
spec/views/projects/issues/_merge_requests_status.html.haml_spec.rb
deleted
100644 → 0
View file @
825bebc6
# frozen_string_literal: true
require
'spec_helper'
describe
'projects/issues/_merge_requests_status.html.haml'
do
around
do
|
ex
|
Timecop
.
freeze
(
Date
.
new
(
2018
,
7
,
22
))
do
ex
.
run
end
end
it
'shows date of status change in tooltip'
do
merge_request
=
create
(
:merge_request
,
created_at:
1
.
month
.
ago
)
render
partial:
'projects/issues/merge_requests_status'
,
locals:
{
merge_request:
merge_request
,
css_class:
''
}
expect
(
rendered
).
to
match
(
"Opened.*about 1 month ago"
)
end
it
'shows only status in tooltip if date is not set'
do
merge_request
=
create
(
:merge_request
,
state: :closed
)
render
partial:
'projects/issues/merge_requests_status'
,
locals:
{
merge_request:
merge_request
,
css_class:
''
}
expect
(
rendered
).
to
match
(
"Closed"
)
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