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
b9db3fbf
Commit
b9db3fbf
authored
Jun 29, 2021
by
Dmitry Gruzd
Committed by
Natalia Tepluhina
Jun 29, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add updated_at to epics search results
parent
83a59b9c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
ee/app/views/search/results/_epic.html.haml
ee/app/views/search/results/_epic.html.haml
+2
-0
ee/spec/features/search/user_searches_for_epics_spec.rb
ee/spec/features/search/user_searches_for_epics_spec.rb
+2
-1
No files found.
ee/app/views/search/results/_epic.html.haml
View file @
b9db3fbf
...
@@ -9,6 +9,8 @@
...
@@ -9,6 +9,8 @@
%span
.term.str-truncated.gl-font-weight-bold.gl-ml-2
=
epic
.
title
%span
.term.str-truncated.gl-font-weight-bold.gl-ml-2
=
epic
.
title
.gl-text-gray-500.gl-my-3
.gl-text-gray-500.gl-my-3
=
sprintf
(
s_
(
'%{group_name}&%{epic_iid} · created %{epic_created} by %{author}'
),
{
group_name:
epic
.
group
.
full_name
,
epic_iid:
epic
.
iid
,
epic_created:
time_ago_with_tooltip
(
epic
.
created_at
,
placement:
'bottom'
),
author:
link_to_member
(
@project
,
epic
.
author
,
avatar:
false
)
}).
html_safe
=
sprintf
(
s_
(
'%{group_name}&%{epic_iid} · created %{epic_created} by %{author}'
),
{
group_name:
epic
.
group
.
full_name
,
epic_iid:
epic
.
iid
,
epic_created:
time_ago_with_tooltip
(
epic
.
created_at
,
placement:
'bottom'
),
author:
link_to_member
(
@project
,
epic
.
author
,
avatar:
false
)
}).
html_safe
·
=
_
(
'updated %{time_ago}'
).
html_safe
%
{
time_ago:
time_ago_with_tooltip
(
epic
.
updated_at
,
placement:
'bottom'
)
}
-
if
epic
.
description
.
present?
-
if
epic
.
description
.
present?
.description.term.col-sm-10.gl-px-0
.description.term.col-sm-10.gl-px-0
=
truncate
(
epic
.
description
,
length:
200
)
=
truncate
(
epic
.
description
,
length:
200
)
ee/spec/features/search/user_searches_for_epics_spec.rb
View file @
b9db3fbf
...
@@ -5,7 +5,7 @@ require 'spec_helper'
...
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec
.
describe
'User searches for epics'
,
:js
do
RSpec
.
describe
'User searches for epics'
,
:js
do
let!
(
:user
)
{
create
(
:user
)
}
let!
(
:user
)
{
create
(
:user
)
}
let!
(
:group
)
{
create
(
:group
)
}
let!
(
:group
)
{
create
(
:group
)
}
let!
(
:epic1
)
{
create
(
:epic
,
title:
'Foo'
,
group:
group
)
}
let!
(
:epic1
)
{
create
(
:epic
,
title:
'Foo'
,
group:
group
,
updated_at:
6
.
days
.
ago
)
}
let!
(
:epic2
)
{
create
(
:epic
,
:closed
,
:confidential
,
title:
'Bar'
,
group:
group
)
}
let!
(
:epic2
)
{
create
(
:epic
,
:closed
,
:confidential
,
title:
'Bar'
,
group:
group
)
}
def
search_for_epic
(
search
)
def
search_for_epic
(
search
)
...
@@ -30,6 +30,7 @@ RSpec.describe 'User searches for epics', :js do
...
@@ -30,6 +30,7 @@ RSpec.describe 'User searches for epics', :js do
page
.
within
(
'.results'
)
do
page
.
within
(
'.results'
)
do
expect
(
page
).
to
have_link
(
epic1
.
title
)
expect
(
page
).
to
have_link
(
epic1
.
title
)
expect
(
page
).
to
have_text
(
'updated 6 days ago'
)
expect
(
page
).
not_to
have_link
(
epic2
.
title
)
expect
(
page
).
not_to
have_link
(
epic2
.
title
)
end
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