Commit a7443e42 authored by Jarka Košanová's avatar Jarka Košanová

Fix displaying roadmap for epics without dates

- includes pdated translations
parent 84eb4944
......@@ -75,7 +75,9 @@ export default {
};
},
timeframeString(roadmapItem) {
if (roadmapItem.startDateUndefined) {
if (roadmapItem.startDateUndefined && roadmapItem.endDateUndefined) {
return sprintf(s__('GroupRoadmap|No start and end date'));
} else if (roadmapItem.startDateUndefined) {
return sprintf(s__('GroupRoadmap|No start date – %{dateWord}'), {
dateWord: dateInWords(this.endDate, true),
});
......
---
title: Display correct information on Roadmap when an epic has no start and due date
merge_request: 37093
author:
type: fixed
......@@ -103,6 +103,13 @@ describe('EpicItemComponent', () => {
expect(wrapper.vm.timeframeString(mockEpic)).toBe('Jul 10, 2017 – Jun 2, 2018');
});
it('returns timeframe string correctly when no dates are defined', () => {
const epic = { ...mockEpic, endDateUndefined: true, startDateUndefined: true };
wrapper = createComponent({ epic });
expect(wrapper.vm.timeframeString(epic)).toBe('No start and end date');
});
it('returns timeframe string correctly when only start date is defined', () => {
const epic = { ...mockEpic, endDateUndefined: true };
wrapper = createComponent({ epic });
......
......@@ -11653,6 +11653,9 @@ msgstr ""
msgid "GroupRoadmap|%{startDateInWords} – %{endDateInWords}"
msgstr ""
msgid "GroupRoadmap|No start and end date"
msgstr ""
msgid "GroupRoadmap|No start date – %{dateWord}"
msgstr ""
......
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