Commit 816f21d3 authored by Mark Chao's avatar Mark Chao

fix sql

parent b7006ffe
......@@ -172,12 +172,12 @@ module EE
def fetch_milestone_date_data
sql = <<~SQL
SELECT milestones.id, milestones.start_date, milestones.due_date FROM milestones
SELECT milestones.id, milestones.start_date, milestones.due_date FROM milestones
INNER JOIN issues ON issues.milestone_id = milestones.id
INNER JOIN epic_issues ON epic_issues.issue_id = issues.id
INNER JOIN (
SELECT MIN(milestones.start_date) AS start_date, MAX(milestones.due_date) AS due_date
FROM milestones
FROM milestones
INNER JOIN issues ON issues.milestone_id = milestones.id
INNER JOIN epic_issues ON epic_issues.issue_id = issues.id
WHERE epic_issues.epic_id = #{id}
......
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