This repository has been archived by the owner on Dec 16, 2020. It is now read-only.
Use correct task count in sprint snapshots #219
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This would prevent a bug reported in https://phabricator.wikimedia.org/T128594 from appearing in sprints closed after this patch is deployed.
tl;dr:
task_count
field of the snapshot has always been set to 1.When not using story points estimates, burn down chart's remaining line and burn up chart's scope line of finished sprints are based on the task count defined in the snapshot (as the sprint has finished, no "live" data is fetched from Phabricator).
Among all changes in #215 setting
task_count
of the snapshot got broken. Dude who merged that PR was too blind to have noticed this problem.This fix will of course not affect already existing snapshots. Task counts of those should be adjusted, I am afraid, manually.
I'd like to have this covered by unit test. Problem is that method creating a snapshots relies heavily on the global state (per
App:make('phabricator')
. This got me thinking if thecreateSnapshot
method really belong toSprint
class.Thus no test for now but I'd like get back to it rather soon.