Mean time to merge calculations do not consider Draft/WIP states
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Release notes
Mean time to merge calculations now exclude the time spent during a draft state of the merge request.
Problem to solve
Customer (internal link) reports that they use draft/WIP merge request states often in their merge request workflows. However, when viewing analytics for the project, the mean time to merge metric does not exclude the time spent during its not-ready-for-review state.
The current metric, as noted also on https://docs.gitlab.com/ee/user/analytics/merge_request_analytics.html#mean-time-to-merge, only calculates the age by comparing the creation time of the merge request against its merge time.
Proposal
Implement a feature that can exclude all times spent during a merge request's draft states. Currently when the draft states alterations are handled, nothing is tracked in terms of time spent in it.