Skip to content

Fix wrong due dates on group/project issues list refactor

Coung Ngo requested to merge 353943-fix-due-date into master

What does this MR do and why?

This MR fixes wrong due dates on the group/project issues list refactor (#322755 (closed)).

Some due dates were converted to JS Date objects from a string like new Date('2022-02-28'). However, if the OS has a time zone such as Pacific Standard Time, then the Date object has a value of Sun Feb 27 2022 16:00:00 GMT-0800. The day 27 is then shown on the UI instead of the correct day 28.

Screenshots or screen recordings

before after
issue sidebar due date Screenshot_2022-03-17_at_8.04.27_am Screenshot_2022-03-17_at_8.04.27_am
issues list due date Screenshot_2022-03-17_at_8.04.38_am Screenshot_2022-03-17_at_8.15.14_am
milestones sidebar due date Screenshot_2022-03-17_at_8.04.57_am Screenshot_2022-03-17_at_8.04.57_am
issues list milestone due date Screenshot_2022-03-17_at_8.04.48_am Screenshot_2022-03-17_at_8.15.26_am

How to set up and validate locally

  1. In rails console enable the feature flag
    Feature.enable(:vue_issues_list)
  2. Change your OS time zone to Pacific Standard Time
  3. Visit any group or project issues list page such as http://127.0.0.1:3000/h5bp/html5-boilerplate/-/issues
  4. Test the MR

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #353943 (closed)

Edited by Coung Ngo

Merge request reports