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
19.35k stars 1.13k forks source link

Bug Report: Draft Experiment incorrectly says `can edit your variants` #23346

Open slshults opened 4 days ago

slshults commented 4 days ago

Bug Description

Bug description

If you create an experiment, save it as a draft, then go back into edit mode to add, rename, or remove variants, clicking Save draft results in error message: Cant' update feature_flag_variants on Experiment:

CleanShot 2024-06-28 at 15 14 00@2x

That error is unexpected by the user because it conflicts with the info box on draft experiments: CleanShot 2024-06-28 at 15 19 09@2x

The variants also cannot be edited on the Feature Flag with the experiment in draft mode: CleanShot 2024-06-28 at 15 15 26@2x

How to reproduce

  1. Create an experiment
  2. Save it as a draft
  3. Edit the draft experiment
  4. Edit, add, or remove one or more variants
  5. Save as draft
  6. Note error message in lower-right corner of page

Additional context

From: https://posthoghelp.zendesk.com/agent/tickets/15183

Debug info

Session: https://us.posthog.com/project/sTMFPsFhdP1Ssg/replay/019060d6-26df-7c51-93e9-baaedddc7e6e?t=2021 
Admin: http://go/adminOrgUS/018e0bbc-c53f-0000-645b-2bdad69f5c3e (Project: 56933)
Sentry: http://go/sentryUS/56933