Flagsmith / flagsmith

Open Source Feature Flagging and Remote Config Service. Host on-prem or use our hosted version at https://flagsmith.com/
https://flagsmith.com/
BSD 3-Clause "New" or "Revised" License
4.61k stars 351 forks source link

Dependent flags #1674

Open dabeeeenster opened 1 year ago

dabeeeenster commented 1 year ago

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:

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:

We've talked about this here but maybe the above solution would be sufficient

landonjs commented 10 months ago

Will this function like a keystone flag? If Flag A is enabled I can also enabled Flag B-F?

dabeeeenster commented 10 months ago

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?

landonjs commented 10 months ago

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

dabeeeenster commented 10 months ago

Yes that is what this would achieve.

dabeeeenster commented 4 months ago

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