gitlab-org--gitlab-foss/changelogs/unreleased/use-date-for-upcoming-milestone-comparison.yml
Sean McGivern 8b9b37f6c8 Fix upcoming milestone for far-future due dates
`NOW()` is a timestamp, with a maximum year (in Postgres) 294276 AD.

`milestones.due_date` is a date with a maximum year (again, in Postgres)
of 5874897 AD.

If there is a due date past the limit for the timestamp, comparing the
two will fail with:
    ERROR:  date out of range for timestamp

We also need to add validations to keep the due dates sensible, but for
now we can simply use `CURRENT_DATE` instead of `NOW()`, so the types
match with no coercion needed.
2019-03-06 13:40:03 +00:00

5 lines
121 B
YAML

---
title: Fix upcoming milestone when there are milestones with far-future due dates
merge_request:
author:
type: fixed