How are you running Flagsmith
Describe the bug
When a flag is enabled and the variant value is falsy, the mixpanel integration incorrectly fallbacks the value to the flag state true instead of false.
The documentation is ambiguous, only stating if the flag has no remote config value, pass the boolean state
# Current mapping
Flag state | Variant value | Sent to Mixpanel
-----------+----------------------------+----------------------
ON | True | true (value)
ON | False / None / 0 / "" | true (enabled state)
ON | "hello" / 42 | the value
OFF | anything | false (enabled state)
Steps To Reproduce
- Activate Mixpanel integration in your environment
- Create a multivariate feature
- Enable the flag
- Set a variant value to be
false
- Mixpanel will show the variant as
true
Expected behavior
The mapping should be:
Flag state | Variant value | Sent to Mixpanel
-----------+----------------------------+----------------------
ON | True | true (value)
ON | False / "" / 0 | false
ON | None / null | true (enabled state)
ON | "hello" / 42 | the value
OFF | anything | false (enabled state)
The resolution of the issue includes:
- Updating the doc to be exhaustive in relation to the behavior
- Communicate with impacted customers before releasing
Screenshots
No response
How are you running Flagsmith
Describe the bug
When a flag is enabled and the variant value is falsy, the mixpanel integration incorrectly fallbacks the value to the flag state
trueinstead offalse.The documentation is ambiguous, only stating
if the flag has no remote config value, pass the boolean stateSteps To Reproduce
falsetrueExpected behavior
The mapping should be:
The resolution of the issue includes:
Screenshots
No response