-
-
Notifications
You must be signed in to change notification settings - Fork 721
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: count lifecycle more accurately (#8816)
This PR fixes three things that were wrong with the lifecycle summary count query: 1. When counting the number of flags in each stage, it does not take into account whether a flag has moved out of that stage. So if you have a flag that's gone through initial -> pre-live -> live, it'll be counted for each one of those steps, not just the last one. 2. Some flags that have been archived don't have the corresponding archived state row in the db. This causes them to count towards their other recorded lifecycle stages, even when they shouldn't. This is related to the previous one, but slightly different. Cross-reference the features table's archived_at to make sure it hasn't been archived 3. The archived number should probably be all flags ever archived in the project, regardless of whether they were archived before or after feature lifecycles. So we should check the feature table's archived_at flag for the count there instead
- Loading branch information
1 parent
4a769d1
commit 6d75ad7
Showing
2 changed files
with
98 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters