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
bcdd4b7b
Commit
bcdd4b7b
authored
Jan 08, 2019
by
Mario de la Ossa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix EpicBaseEntity human_readable_timestamp
parent
8c49f72e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
ee/app/serializers/epic_base_entity.rb
ee/app/serializers/epic_base_entity.rb
+1
-1
ee/spec/serializers/issue_serializer_spec.rb
ee/spec/serializers/issue_serializer_spec.rb
+2
-1
No files found.
ee/app/serializers/epic_base_entity.rb
View file @
bcdd4b7b
...
...
@@ -13,6 +13,6 @@ class EpicBaseEntity < Grape::Entity
epic
.
end_date
&
.
to_s
(
:medium
)
end
expose
:human_readable_timestamp
,
if:
->
(
epic
,
_
)
{
epic
.
end_date
.
present?
||
epic
.
start_date
.
present?
}
do
|
epic
|
remaining_days_in_words
(
epic
)
remaining_days_in_words
(
epic
.
end_date
,
epic
.
start_date
)
end
end
ee/spec/serializers/issue_serializer_spec.rb
View file @
bcdd4b7b
...
...
@@ -10,7 +10,8 @@ describe IssueSerializer do
end
before
do
create
(
:epic_issue
,
issue:
resource
)
epic
=
create
(
:epic
,
:use_fixed_dates
)
create
(
:epic_issue
,
issue:
resource
,
epic:
epic
)
end
context
'sidebar issue serialization'
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