https://www.growthbook.io/ logo
#announcements
Title
# announcements
h

helpful-carpenter-3208

03/22/2022, 2:24 AM
Hi, can we change the feature flag value type after creation? we try to change from number type to string type. but not find the way to change it.
f

future-teacher-7046

03/22/2022, 2:25 AM
that is not possible currently. Is this a feature that is currently being used in production, or a new one you just created?
If it's a brand new feature flag, you can delete it (3 dots on top right of feature page) and re-create it with the same feature id and the correct data type.
h

helpful-carpenter-3208

03/22/2022, 5:04 AM
ok, the issue happens is when I prepared all the things ready. and when another team member reviewing the PR which use the feature flag. he suggest to change the type. so I’m wondering if we can just edit the same existing feature flag. then I don’t need to configure all other parts again like the variant and description. it would be tidies to do it again for just change the variation type = =
Is there any reason that GrowthBook didn’t allow us to edit the type?
I assume it should be just a config data stored in the DB. not sure if it has other things needs to change.
f

fresh-football-47124

03/22/2022, 5:06 AM
we made them not editable the type on the GrowthBook side also effects how they are evaluated, and we thought that it was likely that changing the flag would cause errors
perhaps if we just made it clear what you're doing
yes - it's not a technical limitation
h

helpful-carpenter-3208

03/22/2022, 5:25 AM
Oh I see. indeed when the variation rule was set, if we need to change the type. all the related variation rule should be adjusted as well. could cause some error. maybe we can just prune all the feature flag rules when we want to change the data type. Or just reset all the rule’s data type. for now we can create new one as it’s not used in prod.
f

future-teacher-7046

03/22/2022, 12:48 PM
Changing the type is disabled in the UI to prevent accidental bugs. If a feature is already being used and your code depends on a specific data type, we don't want that to break. Your use case is interesting though. Maybe we can enable editing the type with a bunch of warnings and danger signs.
h

helpful-carpenter-3208

03/22/2022, 1:05 PM
Cool~ this could be useful when people has just created the feature and haven’t used it in prod yet.
21 Views