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
5e1c64a0
Commit
5e1c64a0
authored
Aug 12, 2019
by
Annabel Dunstone Gray
Committed by
Clement Ho
Aug 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add specs for showing epic metadata in epic list
and internationalized relevant strings
parent
dbc3556e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
70 additions
and
11 deletions
+70
-11
app/views/projects/issues/_issue.html.haml
app/views/projects/issues/_issue.html.haml
+3
-2
app/views/projects/merge_requests/_merge_request.html.haml
app/views/projects/merge_requests/_merge_request.html.haml
+4
-3
ee/app/views/groups/epics/_epic.html.haml
ee/app/views/groups/epics/_epic.html.haml
+12
-0
ee/changelogs/unreleased/add-metadata-to-epic-list-view.yml
ee/changelogs/unreleased/add-metadata-to-epic-list-view.yml
+5
-0
ee/spec/features/epics/epics_list_spec.rb
ee/spec/features/epics/epics_list_spec.rb
+37
-6
locale/gitlab.pot
locale/gitlab.pot
+9
-0
No files found.
app/views/projects/issues/_issue.html.haml
View file @
5e1c64a0
...
...
@@ -45,7 +45,7 @@
%ul
.controls
-
if
issue
.
closed?
%li
.issuable-status
CLOSED
=
_
(
'CLOSED'
)
-
if
issue
.
assignees
.
any?
%li
=
render
'shared/issuable/assignees'
,
project:
@project
,
issuable:
issue
...
...
@@ -53,4 +53,5 @@
=
render
'shared/issuable_meta_data'
,
issuable:
issue
.float-right.issuable-updated-at.d-none.d-sm-inline-block
%span
updated
#{
time_ago_with_tooltip
(
issue
.
updated_at
,
placement:
'bottom'
,
html_class:
'issue_update_ago'
)
}
%span
=
_
(
'updated %{time_ago}'
).
html_safe
%
{
time_ago:
time_ago_with_tooltip
(
issue
.
updated_at
,
placement:
'bottom'
,
html_class:
'issue_update_ago'
)
}
app/views/projects/merge_requests/_merge_request.html.haml
View file @
5e1c64a0
...
...
@@ -41,11 +41,11 @@
%ul
.controls.d-flex.align-items-end
-
if
merge_request
.
merged?
%li
.issuable-status.d-none.d-sm-inline-block
MERGED
=
_
(
'MERGED'
)
-
elsif
merge_request
.
closed?
%li
.issuable-status.d-none.d-sm-inline-block
=
icon
(
'ban'
)
CLOSED
=
_
(
'CLOSED'
)
-
if
can?
(
current_user
,
:read_pipeline
,
merge_request
.
head_pipeline
)
%li
.issuable-pipeline-status.d-none.d-sm-flex
=
render
'ci/status/icon'
,
status:
merge_request
.
head_pipeline
.
detailed_status
(
current_user
),
option_css_classes:
'd-flex'
...
...
@@ -61,4 +61,5 @@
=
render
'shared/issuable_meta_data'
,
issuable:
merge_request
.float-right.issuable-updated-at.d-none.d-sm-inline-block
%span
updated
#{
time_ago_with_tooltip
(
merge_request
.
updated_at
,
placement:
'bottom'
,
html_class:
'merge_request_updated_ago'
)
}
%span
=
_
(
'updated %{time_ago}'
).
html_safe
%
{
time_ago:
time_ago_with_tooltip
(
merge_request
.
updated_at
,
placement:
'bottom'
,
html_class:
'merge_request_updated_ago'
)
}
ee/app/views/groups/epics/_epic.html.haml
View file @
5e1c64a0
...
...
@@ -19,3 +19,15 @@
-
epic
.
labels
.
each
do
|
label
|
=
render_label
(
label
.
present
(
issuable_subject:
@group
),
tooltip:
true
,
link:
group_epics_path
(
@group
,
label_name
:[
label
.
name
]),
css:
'label-link'
)
.issuable-meta
%ul
.controls
-
if
epic
.
closed?
%li
.issuable-status
=
_
(
'CLOSED'
)
=
render
'shared/issuable_meta_data'
,
issuable:
epic
.float-right.issuable-updated-at.d-none.d-sm-inline-block
%span
=
_
(
'updated %{time_ago}'
).
html_safe
%
{
time_ago:
time_ago_with_tooltip
(
epic
.
updated_at
,
placement:
'bottom'
,
html_class:
'issue_update_ago'
)
}
ee/changelogs/unreleased/add-metadata-to-epic-list-view.yml
0 → 100644
View file @
5e1c64a0
---
title
:
Add note count, updated timestamp, and closed tag to epics list view
merge_request
:
author
:
type
:
changed
ee/spec/features/epics/epics_list_spec.rb
View file @
5e1c64a0
...
...
@@ -37,6 +37,15 @@ describe 'epics list', :js do
expect
(
first
(
'.nav-sidebar .active a .count'
)).
to
have_content
(
'3'
)
end
it
'shows epic updated date and comment count'
do
page
.
within
(
'.issuable-list'
)
do
page
.
within
(
'li:nth-child(1) .issuable-meta'
)
do
expect
(
find
(
'.issuable-updated-at'
)).
to
have_content
(
'updated just now'
)
expect
(
find
(
'.issuable-comments'
)).
to
have_content
(
'0'
)
end
end
end
it
'renders the filtered search bar correctly'
do
page
.
within
(
'.content-wrapper .content'
)
do
expect
(
page
).
to
have_css
(
'.epics-filters'
)
...
...
@@ -50,15 +59,15 @@ describe 'epics list', :js do
expect
(
find
(
'.top-area'
)).
to
have_content
(
'All 3'
)
page
.
within
(
'.issuable-list'
)
do
page
.
within
(
'li:nth-child(1)'
)
do
page
.
within
(
'li:nth-child(1)
.issuable-main-info
'
)
do
expect
(
page
).
to
have_content
(
epic3
.
title
)
end
page
.
within
(
'li:nth-child(2)'
)
do
page
.
within
(
'li:nth-child(2)
.issuable-main-info
'
)
do
expect
(
page
).
to
have_content
(
epic2
.
title
)
end
page
.
within
(
'li:nth-child(3)'
)
do
page
.
within
(
'li:nth-child(3)
.issuable-main-info
'
)
do
expect
(
page
).
to
have_content
(
epic1
.
title
)
end
end
...
...
@@ -84,15 +93,15 @@ describe 'epics list', :js do
expect
(
find
(
'.top-area'
)).
to
have_content
(
'All 3'
)
page
.
within
(
'.issuable-list'
)
do
page
.
within
(
'li:nth-child(1)'
)
do
page
.
within
(
'li:nth-child(1)
.issuable-main-info
'
)
do
expect
(
page
).
to
have_content
(
epic3
.
title
)
end
page
.
within
(
'li:nth-child(2)'
)
do
page
.
within
(
'li:nth-child(2)
.issuable-main-info
'
)
do
expect
(
page
).
to
have_content
(
epic2
.
title
)
end
page
.
within
(
'li:nth-child(3)'
)
do
page
.
within
(
'li:nth-child(3)
.issuable-main-info
'
)
do
expect
(
page
).
to
have_content
(
epic1
.
title
)
end
end
...
...
@@ -150,6 +159,28 @@ describe 'epics list', :js do
end
end
context
'when closed epics exist for the group'
do
let!
(
:epic1
)
{
create
(
:epic
,
:closed
,
group:
group
,
end_date:
10
.
days
.
ago
)
}
before
do
visit
group_epics_path
(
group
)
end
it
'shows epic status, updated date and comment count'
do
page
.
within
(
'.epics-state-filters'
)
do
click_link
'Closed'
end
page
.
within
(
'.issuable-list'
)
do
page
.
within
(
'li:nth-child(1) .issuable-meta'
)
do
expect
(
find
(
'.issuable-status'
)).
to
have_content
(
'CLOSED'
)
expect
(
find
(
'.issuable-updated-at'
)).
to
have_content
(
'updated just now'
)
expect
(
find
(
'.issuable-comments'
)).
to
have_content
(
'0'
)
end
end
end
end
context
'when no epics exist for the group'
do
before
do
visit
group_epics_path
(
group
)
...
...
locale/gitlab.pot
View file @
5e1c64a0
...
...
@@ -2554,6 +2554,9 @@ msgstr ""
msgid "CICD|instance enabled"
msgstr ""
msgid "CLOSED"
msgstr ""
msgid "CONTRIBUTING"
msgstr ""
...
...
@@ -8841,6 +8844,9 @@ msgstr ""
msgid "Logs"
msgstr ""
msgid "MERGED"
msgstr ""
msgid "MRApprovals|Approved by"
msgstr ""
...
...
@@ -18546,6 +18552,9 @@ msgstr ""
msgid "updated"
msgstr ""
msgid "updated %{time_ago}"
msgstr ""
msgid "user avatar"
msgstr ""
...
...
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