Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segment conditions are duplicated when saving multiple updates and not refreshing #4725

Closed
1 of 4 tasks
rolodato opened this issue Oct 11, 2024 · 0 comments · Fixed by #4726
Closed
1 of 4 tasks

Segment conditions are duplicated when saving multiple updates and not refreshing #4725

rolodato opened this issue Oct 11, 2024 · 0 comments · Fixed by #4726
Assignees
Labels
bug Something isn't working front-end Issue related to the React Front End Dashboard

Comments

@rolodato
Copy link
Member

rolodato commented Oct 11, 2024

How are you running Flagsmith

  • Self Hosted with Docker
  • Self Hosted with Kubernetes
  • SaaS at flagsmith.com
  • Some other way (add details in description below)

Describe the bug

dupe.segment.mov

Steps To Reproduce

  1. From an existing segment, add a condition A
  2. Save changes, don't close the modal
  3. Add another OR condition B
  4. Save changes
  5. Refresh the page - condition A is now duplicated

This happens because after the initial save, the frontend does not save the new ID that the API assigned to condition A. When saving condition B, it sends condition A without an ID, which the API interprets to be an entirely new condition.

First save - in this case, condition 1 existed in the segment before loading. Condition 2was added here.

Image

Second save - condition 3 was added here, but condition 2 is sent again without an ID. This causes condition 2 to get duplicated.

Image

Expected behavior

Don't duplicate conditions.

Screenshots

No response

@rolodato rolodato added bug Something isn't working front-end Issue related to the React Front End Dashboard labels Oct 11, 2024
@kyle-ssg kyle-ssg linked a pull request Oct 15, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working front-end Issue related to the React Front End Dashboard
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants