stable

Clone or download

Read-only

Fix: remove NIH syndrom in our dates computation in Roadmap

In some configurations, for example when the Tuleap server/user timezone is Europe/Paris but the user's operating system is Atlantic/Azores then the months displayed in the Roadmap widget are wrong. Timezones are hard, we should not try to be smarter than dedicated libraries. Replace the default javascript Date usage by [luxon][0]. We now force the timezone to be the one set in Tuleap user preference page, so that we have consistent results among dates computed on client and server side. To test: change your OS timezone, and refresh the Roadmap widget. The today indicator should always be on February. [0]: https://moment.github.io/luxon/ Closes request #36845: The Current Date Marker on the Road Map is off by 1 Month Change-Id: Iadc25ebdd8cb91cc61be989dd2b7d87f122cfc6e

Modified Files

Name
M plugins/roadmap/scripts/roadmap-widget/jest.config.js +1 −0 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/package.json +3 −1 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/pnpm-lock.yaml +744 −7 Go to diff View file
R plugins/roadmap/scripts/roadmap-widget/src/current-week-number.d.ts Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/App.test.ts +11 −2 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/Gantt/GanttBoard.test.ts +41 −38 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/Gantt/Iteration/IterationBar.test.ts +9 −8 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/Gantt/Iteration/IterationBar.vue +1 −4 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/Gantt/Iteration/IterationsRibbon.test.ts +3 −2 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/Gantt/ScrollingArea.test.ts +4 −3 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/Gantt/Subtask/SubtaskHeader.test.ts +3 −2 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/Gantt/Task/BackgroundGrid.test.ts +5 −2 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/Gantt/Task/BackgroundGrid.vue +3 −2 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/Gantt/Task/BarPopover.test.ts +7 −6 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/Gantt/Task/DependencyArrow.test.ts +27 −26 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/Gantt/Task/GanttTask.test.ts +49 −34 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/Gantt/Task/TaskBar.test.ts +16 −15 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/Gantt/Task/TaskHeader.test.ts +3 −2 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/Gantt/TimePeriod/TimePeriodHeader.test.ts +12 −9 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/Gantt/TimePeriod/TimePeriodHeader.vue +3 −2 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/Gantt/TimePeriod/TimePeriodUnits.test.ts +5 −2 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/Gantt/TimePeriod/TimePeriodUnits.vue +3 −2 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/Gantt/TodayIndicator.test.ts +8 −5 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/Gantt/TodayIndicator.vue +7 −8 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/components/LoadingState.vue +5 −4 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/begin-end-of-period.test.ts +9 −8 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/begin-end-of-period.ts +3 −2 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/dependency-map-builder.test.ts +7 −6 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/first-date.test.ts +61 −60 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/first-date.ts +3 −2 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/iterations-retriever.ts +2 −2 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/last-date.test.ts +67 −66 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/last-date.ts +3 −2 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/left-position.test.ts +12 −9 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/left-postion.ts +4 −3 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/rows-sorter.test.ts +56 −53 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/rows-sorter.ts +1 −1 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/task-has-valid-dates.test.ts +8 −7 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/task-has-valid-dates.ts +2 −2 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/task-retriever.test.ts +2 −2 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/task-retriever.ts +7 −6 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/tasks-dimensions.test.ts +39 −23 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/tasks-dimensions.ts +2 −5 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/time-period-month.test.ts +25 −20 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/time-period-month.ts +23 −33 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/time-period-quarter.test.ts +39 −44 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/time-period-quarter.ts +16 −24 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/time-period-week.test.ts +28 −25 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/helpers/time-period-week.ts +21 −46 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/index.ts +6 −0 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/store/index.ts +2 −1 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/store/iterations/iterations-getters.test.ts +7 −6 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/store/iterations/iterations-getters.ts +7 −6 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/store/root-actions.test.ts +5 −4 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/store/timeperiod/timeperiod-getters.test.ts +51 −50 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/store/timeperiod/timeperiod-getters.ts +7 −9 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/store/type.ts +2 −1 Go to diff View file
M plugins/roadmap/scripts/roadmap-widget/src/type.ts +15 −9 Go to diff View file