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

Change request diff shows incorrect value diff #3937

Open
1 of 4 tasks
matthewelwell opened this issue May 14, 2024 · 3 comments · May be fixed by #3946
Open
1 of 4 tasks

Change request diff shows incorrect value diff #3937

matthewelwell opened this issue May 14, 2024 · 3 comments · May be fixed by #3946
Assignees
Labels
bug Something isn't working front-end Issue related to the React Front End Dashboard

Comments

@matthewelwell
Copy link
Contributor

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

If a feature state has multiple values for different types then the diff can show the wrong previous value for the change request.

Steps To Reproduce

  1. Create a feature state and change it's value from integer to boolean
  2. Create a change request for that feature without changing the value
  3. Notice that the change request diff shows that the value has changed

Expected behavior

The change request diff should not show any change to the value

Screenshots

image image
@matthewelwell matthewelwell added bug Something isn't working front-end Issue related to the React Front End Dashboard labels May 14, 2024
@kyle-ssg
Copy link
Member

kyle-ssg commented May 14, 2024

I think the issue here is more that the feature state has multiple values for different types. That's an invalid state, right @matthewelwell ?

feature_state_value only has 1 value in the SDK flags endpoint, so we don't really support (or should support) multiple types.

@matthewelwell
Copy link
Contributor Author

I think the issue here is more that the feature state has multiple values for different types. That's an invalid state, right @matthewelwell ?

feature_state_value only has 1 value in the SDK flags endpoint, so we don't really support (or should support) multiple types.

@kyle-ssg we don't clear the value for other types, we just set the type parameter which is used everywhere on the server side and should be respected by the FE too. You're right that, strictly, we should probably clear other values when the type changes, but clearing that data, vs getting the FE to respect the type value is a lot of effort.

@kyle-ssg
Copy link
Member

Yeah, I think the FE should be clearing the other values here when a new one is set. I thought this was the case.

@kyle-ssg kyle-ssg linked a pull request May 14, 2024 that will close this issue
5 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.

3 participants