FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
130 stars 26 forks source link

Setting ENUM fields from the FlutterFlow Firestore CMS stores a wrong value #2546

Closed marinosabijan closed 4 months ago

marinosabijan commented 8 months ago

Has your issue been reported?

Current Behavior

When setting the enum value using the firestore CMS from flutterflow,

image

the value is set wrong as such:

Screenshot 2024-03-17 at 21 23 08

Expected Behavior

It is expected to store the value as it should with the name of the enum:

Screenshot 2024-03-17 at 21 23 11

It only sets the value of the enum correctly when setting it from the app itself, not when setting it from flutterflow CMS. So it's expected that works as well.

Steps to Reproduce

  1. Create an enum type in your app
  2. add the enum as a filed in one of your collections/ documents
  3. use the flutterflow firestore CMS to set the value of the enum and verify the wrong value being set in firestore

Reproducible from Blank

Bug Report Code (Required)

ITFTi8mAvJN2xcdY+KnhKu1FlWA4I0MdXOczitVEew4bCIj4PaQuZvSkYlZoQsyzaHxAJU6b/X8f3MrJk+LpUPoEAymtb6Zayc1uSxPPbGamV4SwOrqWQH9DM+BYGGqf0bensyRQGLBaSiEB2173Pe6Qbz2Cf9qOYwx5e6fDbOY=

Context

I am trying to use the flutteflow firestore CMS to set enum field values for the locale types. I don't want to use string for it, because I want my CMS users to not produce errors by misstyping the strings of the locale codes.

Visual documentation

Screenshot 2024-03-17 at 21 23 11

Screenshot 2024-03-17 at 21 23 08

image

Additional Info

No response

Environment

- FlutterFlow version: v4.1.33
- Platform: Mobile, Web and CMS
- Browser name and version: Chrome, Version 122.0.6261.129 (Official Build) (x86_64)
- Operating system and version affected: MacOS, N/A
github-actions[bot] commented 7 months ago

This issue is stale because it has been open for 7 days with no activity. If there are no further updates, a team member will close the issue.

marinosabijan commented 7 months ago

Any updates?

davood-flutterflow commented 7 months ago

@hariprasadms I also replicated this issue, It's a bug in our CMS

marinosabijan commented 7 months ago

@davood-flutterflow is it fixed?

ignalauret commented 7 months ago

Hey @marinosabijan thanks for your report. I was able to replicate your problem, I'm sending a ticket to the Engineering team to fix it. They will keep you updated on this thread.
Have a good day!

autarkiekonzepte commented 6 months ago

String? enum2String(YourEnumHere? enumValue) {

/// MODIFY CODE ONLY BELOW THIS LINE

// convert enum to string

return enumValue?.serialize();

/// MODIFY CODE ONLY ABOVE THIS LINE

}

Perlo34 commented 6 months ago

Any update ? the issue was submitted since more than a month , many FF update but not fix

Perlo34 commented 6 months ago

Sorry , it work now from action create document but the issue perssist when create document from content manager

solkennedy commented 6 months ago

This bug is still present as of today

StormKiller commented 6 months ago

It doesn't seem to be fixed on my project. Can anyone confirm that it is fixed on yours?

AnushaFF commented 6 months ago

Hi @StormKiller the fix is not yet released. You would have to wait until the next release to verify the fix. Please let us know if the issue persists after the release. Thanks!

StormKiller commented 6 months ago

Thank you so much @AnushaFF Appreciate your quick response :)

StormKiller commented 5 months ago

Does anyone know which release will include this fix?

My version FlutterFlow v4.1.53+ released May 17, 2024 Flutter version is 3.19.1

PeninPab commented 5 months ago

Does anyone know which release will include this fix?

My version FlutterFlow v4.1.53+ released May 17, 2024 Flutter version is 3.19.1

This recent release has fixed the Enums, it's now properly storing the value to what has been typed for the value. However I am experiencing an issue where when editing the enum field in the firebase data manager provided by Flutterflow, it shows up as unset when I edit a document. Requires me to reset the values of the enums once more before applying the update to the document.

anuragggg commented 4 months ago

Does anyone know which release will include this fix? My version FlutterFlow v4.1.53+ released May 17, 2024 Flutter version is 3.19.1

This recent release has fixed the Enums, it's now properly storing the value to what has been typed for the value. However I am experiencing an issue where when editing the enum field in the firebase data manager provided by Flutterflow, it shows up as unset when I edit a document. Requires me to reset the values of the enums once more before applying the update to the document.

facing the same issue, any updates ??

StormKiller commented 4 months ago

@PeninPab @anuragggg I have the same issue. Although this is a regression bug, we need to open a new issue for this. I'm a bit tied up with my work at the moment. Could anyone help open a new issue (with screen and reproduce steps)?

leighajarett commented 4 months ago

So sorry about this! We're taking another look and will have an update soon

StormKiller commented 4 months ago

Thank you so much for your attention @leighajarett :)

vieiraes commented 4 months ago

following

leighajarett commented 4 months ago

We've resolved this in our codebase and will have a fix out ASAP

StormKiller commented 4 months ago

Thank you again @leighajarett !! Appreciate your attention :)