summaryrefslogtreecommitdiff
path: root/changelogs
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2019-03-06 12:30:03 +0000
committerSean McGivern <sean@gitlab.com>2019-03-06 13:40:03 +0000
commit8b9b37f6c86bfc049f0b4fc785ae01d94545ab48 (patch)
tree7acce1ce3e31da37bac5ff1c4fb494a19ee3b5a1 /changelogs
parent8a49eeed6db026b0454c2119ab18b0b09d9661ff (diff)
downloadgitlab-ce-8b9b37f6c86bfc049f0b4fc785ae01d94545ab48.tar.gz
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.
Diffstat (limited to 'changelogs')
-rw-r--r--changelogs/unreleased/use-date-for-upcoming-milestone-comparison.yml5
1 files changed, 5 insertions, 0 deletions
diff --git a/changelogs/unreleased/use-date-for-upcoming-milestone-comparison.yml b/changelogs/unreleased/use-date-for-upcoming-milestone-comparison.yml
new file mode 100644
index 00000000000..06c638a6522
--- /dev/null
+++ b/changelogs/unreleased/use-date-for-upcoming-milestone-comparison.yml
@@ -0,0 +1,5 @@
+---
+title: Fix upcoming milestone when there are milestones with far-future due dates
+merge_request:
+author:
+type: fixed