-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Let me compare string properties via greater than/less than, in feature flag conditions and people filters #24771
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I've tried utilizing regular expressions to match versions, but that is arguably more brittle and significantly more difficult to create than the above options. We have effectively set properties on users based on their app version now to avoid deploying features based on app version, but this requires more foresight and coordination between frontend/backend than we should need here. Having this feature would have easily saved us a few hours a month. I'm sure we're not the only ones! |
We are also experiencing this issue and have resorted to temporary solutions requiring maintenance with inclusion lists, exclusion lists, and regex. +1 to string comparison that covers standard semantic versioning. |
+1 We're also coming across this issue. |
Hi @aseemk, I'm not sure that String sorting would put: I'll talk with the team and see if there's support for this idea. |
Feature request
Is your feature request related to a problem?
Our server tracks the last app version it has seen for each user, so we also send this property to PostHog as a person property. And we thought that's great, we can now use this property in feature flag rules (release conditions) while still retaining local evaluation benefits.
However, our app version is (like for many apps) a string property, since it consists of multiple parts (major/minor/patch, like typical semvers). E.g.
1.2.3
.Unfortunately — this baffled us and we thought we were crazy at first, that we must be missing this somewhere — we don't see any way to filter string properties by
<
,<=
,>
, or>=
— only by equality, contains, and regex. Why is this? Could these standard string comparison operators be added?Describe the solution you'd like
Would love to be able to set simple rules & filters like
lastAppVersion >= '1.2.3'
orlastAppVersion < '1.2.3'
.Describe alternatives you've considered
We're currently now resorting to a crazy manual & brittle workaround of sending additional person properties to PostHog of the version components:
lastAppVersionMajor
,lastAppVersionMinor
, andlastAppVersionPatch
.And then we're creating this frankenstein of a ruleset:
(This is even more annoying because numeric properties can only be filtered by
>
and<
, not>=
or<=
. So what we really meant to say here is:lastAppVersion >= '24.32.1'
, but had to write it as this.)This is super brittle though — it'll literally stop working whenever we bump either our major version (e.g. to
25.0.0
) or minor version (e.g. to24.33.0
) next.Additional context
Please help us! We're really wishing this were better, and would love to not have a ticking time bomb in our feature flags that we forget next major or minor bump. Thank you so much.
Debug info
Session: https://us.posthog.com/project/sTMFPsFhdP1Ssg/replay/0191bb17-062e-75e1-b1ad-900bd76ab1b2?t=1318 Admin: http://go/adminOrgUS/018d351a-9ff7-0000-eaff-4628875ad045 (project ID 50689) Sentry: http://go/sentryUS/50689
The text was updated successfully, but these errors were encountered: