flagsmith icon indicating copy to clipboard operation
flagsmith copied to clipboard

Add feature statistics

Open matthewelwell opened this issue 1 year ago • 2 comments
trafficstars

Is your feature request related to a problem? Please describe.

I want to be able to see how long a feature has existed.

Describe the solution you'd like.

I think we can add a few things to help here:

  • [x] Show a UI hint on each feature if it has been more than x days since it was created
  • [ ] Show a statistic above the features which provides the total number of features that were created more than x days ago
  • [ ] Clicking this statistic (or similar) should filter the list of features for those that were created more than x days ago

Describe alternatives you've considered

N/a

Additional context

No response

matthewelwell avatar Apr 24 '24 10:04 matthewelwell

From an API perspective, we need to provide:

  1. An option to filter the list of features based on 'created date is less than X'
  2. Some meta statistics on the features in a given project. I'm wondering if this can be added as an extra attribute in the response to GET /projects/:id/features/. e.g. alongside "results" in the paged response we could add a "meta" attribute which then provides statistics about all the features in the project. Alternatively, we could create a new /statistics endpoint which would provide this data.

matthewelwell avatar Apr 24 '24 10:04 matthewelwell

Since we have a ui helper for flags created x ago, I think it'd make more sense to focus this ticket on statistics.

Having just 1 statistic would be a bit weird so it might be worth us specifying what high level items we'd want. Here's some I think would be useful

  • Features updated in the past x days
  • Stale features
  • Features created x days ago
  • Deleted features
  • Unused feature flags - i.e. usage is 0 for x days, this could help identify features that aren't actually being used

kyle-ssg avatar Jun 05 '24 07:06 kyle-ssg