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

Errors when saving feature metadata fields are silently ignored #4295

Open
1 of 4 tasks
rolodato opened this issue Jul 8, 2024 · 2 comments · Fixed by #4327
Open
1 of 4 tasks

Errors when saving feature metadata fields are silently ignored #4295

rolodato opened this issue Jul 8, 2024 · 2 comments · Fixed by #4327
Labels
bug Something isn't working

Comments

@rolodato
Copy link
Member

rolodato commented Jul 8, 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

When saving any of these changes to metadata in a feature, no error is shown and the changes are not persisted after refreshing the page:

  • Erasing a required field and leaving it blank
  • Setting an int field to a string
  • Setting a URL field to an invalid URL

Steps To Reproduce

  1. Create a required feature metadata field
  2. Create a feature and provide the required field
  3. Edit the feature, and remove the value for the metadata field
  4. Changes are saved, but after you refresh the page the old value is still there

Expected behavior

Users should not be allowed to save changes to features that have invalid metadata fields (invalid type or missing value on a required field).

Screenshots

metadata.saving.feature.mov
@rolodato rolodato added the bug Something isn't working label Jul 8, 2024
@novakzaballa novakzaballa linked a pull request Jul 11, 2024 that will close this issue
5 tasks
@rolodato
Copy link
Member Author

@novakzaballa This wasn't fully fixed by #4327 - there's a bug still when trying to save required fields without providing a value:

Screen.Recording.2024-07-31.at.13.20.35.mov

Possibly the easiest way to solve this would be to have the validations for fields be checked on input for the field, and not when the field is unfocused. Let me know if I can clarify anything else on this.

@rolodato rolodato reopened this Jul 31, 2024
@novakzaballa
Copy link
Contributor

@novakzaballa This wasn't fully fixed by #4327 - there's a bug still when trying to save required fields without providing a value:

Possibly the easiest way to solve this would be to have the validations for fields be checked on input for the field, and not when the field is unfocused. Let me know if I can clarify anything else on this.

Hey @rolodato, I'll take a look at it. Thanks for the feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants