Wrong issue completion graph / burndown chart in milestones
Summary
The graph of new and completed issues in a milestone is rendered based on:
- issue creation date
- issue close date
- issue reopen date
Unfortunately, GitLab considers all issue assigned to a milestone to be created at the start time of the milestone itself.
In my uploaded first screenshot, several issues can be seen for a 2018
milestone. The milestone starts at 01.01.2018
and ends at 31.12.2018
.
The repository was created some days ago and thus the issues haven't been created on 01.10.2018
.
Steps to reproduce
- Create a milestone for
2018
- Set start date to
01.01.2018
- Set end date to
31.12.2018
- Set start date to
- Create several issue on different days
- Close some of the issues
- Reopen one of the issues
Example Project
The issue can easily be reproduced; no repository needed.
The issue was discovered on a local GitLab-EE Ultimate installation.
What is the current bug behavior?
The issue graph starts at the beginning of the milestone period with 100% / all issues. But most of the issues have been created after the milestone has started. The expected curve is a hill (creating more and more issues and then closing more issues then new issues get created.) The current graph shows steps instead of a "hill".
What is the expected correct behavior?
The number of issues should increate in the time frame, if the creation date of an issue is later then the start date of the milestone.
The correct behavior is shown in the first screenshot as a blue line.
Relevant logs and/or screenshots
Output of checks
GitLab-EE Ultimate 10.7.2-ee
Results of GitLab environment info
Does not apply.
Results of GitLab application Check
Does not apply.
Possible fixes
Check if creation date of an issue is before or after the start date of a milestone:
- before: add the issue to the initial set of issues for the graph's y-value
- after: add the issue to the graph's y-value, when the graph reaches (traverse x-axis) the creation date of the issue.
(If you can, link to the line of code that might be responsible for the problem)