Skip to content
Snippets Groups Projects
Commit 9bb647d8 authored by ayeaye's avatar ayeaye
Browse files

Handle milestones without start dates

parent 00743ae8
No related merge requests found
......@@ -31,7 +31,7 @@ def makeIssue(issue, isMilestone = False):
try:
start = date.fromisoformat(issue.start_date)
except (TypeError, AttributeError):
if end:
if end and not isMilestone:
start = end - timedelta(issue.time_stats()["time_estimate"] * 3 / 86400)
else:
start = None
......@@ -133,7 +133,7 @@ def gantt(pid):
except gitlab.exceptions.GitlabListError:
issues = projgantt( gl.projects.get(pid, lazy=True) )
si = sorted([x for x in issues if x.msType], key = lambda x: x.pStart)
si = sorted([x for x in issues if x.msType], key = lambda x: x.pStart+x.pEnd)
try:
pStart = min((x.pStart for x in si if x.pStart != "None")),
except ValueError:
......
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