PR iteration time is the average time between the first non-submitter comment and the final commit on a pull request.
Which reports use PR iteration time?
You can see PR iteration time in reports like Team health insights, Review collaboration, and Check-in.
Note: In the Collaboration metrics API, PR iteration time is called Rework time.
What does PR iteration time measure?
PR iteration time tells you how long it takes to implement changes requested on pull requests.
This metric helps teams see if changes on pull requests are being made in a timely fashion.
High iteration times often mean that the initial pull request lacked quality or was misaligned with requirements. In other cases, the pull request provided an incomplete solution or the reviewer’s requested changes were time-consuming or out of scope. Having issues with the initial pull request means that subsequent commits to get the pull request merged can take longer than desired
How is PR iteration time calculated?
The PR iteration time for an individual pull request is calculated as the difference in time between the timestamp of the final commit on the pull request and the timestamp of the first non-excluded, non-submitter comment.
If a pull request has no follow-on commits after a non-submitter comment, the PR iteration time for the pull request is 0.
The PR iteration time for an individual, team, or organization is calculated as the sum of the PR iteration times for all merged pull requests created by them, divided by the total number of merged pull requests, rounded to the nearest tenth of an hour.
What data is included in PR iteration time?
A pull request counts toward PR iteration time if it is a reviewed pull request and is merged. The pull request must also have a non-excluded, non-submitter comment made before a follow-on commit.
Pull requests are not counted toward PR iteration time if:
- they are created by a user who is excluded from reports
- they are created by a hidden user
- they are an excluded pull request
- they are from a deleted repository
Note: User view rights and permissions also impact how specific users will see PR iteration time