PostHog / posthog

🦔 PostHog provides open-source product analytics, session recording, feature flagging and A/B testing that you can self-host.
https://posthog.com
Other
20.38k stars 1.21k forks source link

Bug: possible to edit a deleted feature flag #19857

Open jurajmajerik opened 7 months ago

jurajmajerik commented 7 months ago

Is your feature request related to a problem?

From a user:

When trying to restore a deleted feature flag by going into history -> edit feature flag -> save, a toast states that the feature flag has been saved, and it is shown in the feature flag list. But when I try to refresh the feature flag disappears.

The flag appears in the list because of the optimistic UI update.

Describe the solution you'd like

We should either:

Describe alternatives you've considered

Additional context

Internal ticket: https://posthoghelp.zendesk.com/agent/tickets/9486

Thank you for your feature request – we love each and every one!

neilkakkar commented 7 months ago

hmm, maybe something has changed around this flow, this was the undocumented way to revive dead feature flags till we get a more formal way, so it actually used to set deleted=False when you saved a deleted one. 🤔