Commit bcdd4b7b authored by Mario de la Ossa's avatar Mario de la Ossa

Fix EpicBaseEntity human_readable_timestamp

parent 8c49f72e
......@@ -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
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment