flagsmith
flagsmith copied to clipboard
Dependent flags
Flags being dependent on other flags has been requested several times.
One option for this would be to allow flag booleans/values to be used as segment operator values. So for example, if you wanted Flag B to only be enabled if Flag A is enabled:
- Create Flag A. Set as disabled.
- Create Flag B. Set as disabled.
- Create Segment. Single Rule: If Value of Flag A is set.
- Set a segment override on Flag B: If Segment set, override Flag B value to true.
Cross-Project dependencies
We often get asked "Can we have a project with shared flags and a project with specific flags for e.g. iOS that combines both sets of flags". We could achieve this functionality with cross-project dependencies. Eg:
- Create a shared project and a flag
my_flag_1
- Create an Android project
- Create an iOS project
- Create a flag in iOS and one in Android,
my_flag_1
and make it dependent on the shared project flag.
We've talked about this here but maybe the above solution would be sufficient
Will this function like a keystone flag? If Flag A is enabled I can also enabled Flag B-F?
Will this function like a keystone flag? If Flag A is enabled I can also enabled Flag B-F?
Sorry I'm not clear what you mean here?
From your example in the description will I be able to set the value of one flag based on another flag. Will I be able to set the value of multiple flags based on Flag A?
That would get me close to something like this: https://martinfowler.com/bliki/KeystoneInterface.html
Yes that is what this would achieve.
Related discussion on Stack Overflow here https://stackoverflow.com/questions/77011138/make-feature-flag-required-based-on-another-feature-flag-in-flagsmith/78060046?noredirect=1#comment137673786_78060046