Skip to content
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

Support multiple entries for selector and tag_name filter for EE #3766

Merged
merged 3 commits into from Mar 30, 2021

Conversation

mariusandra
Copy link
Collaborator

@mariusandra mariusandra commented Mar 26, 2021

Changes

  • This filter didn't work because it wasn't expecting an array of options. Same for "tag name"
    image
  • Sentry error

Checklist

  • All querysets/queries filter by Organization, by Team, and by User
  • Django backend tests
  • Jest frontend tests
  • Cypress end-to-end tests

Copy link
Contributor

@macobo macobo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is missing tests. Given the depth of the filtering stack, they are a hard requirement here.

ee/clickhouse/models/property.py Show resolved Hide resolved
@timgl timgl temporarily deployed to posthog-pr-3766 March 26, 2021 10:18 Inactive
@mariusandra
Copy link
Collaborator Author

Indeed, a test has now been added... and it helped fix one bug.

@mariusandra mariusandra temporarily deployed to posthog-pr-3766 March 26, 2021 11:12 Inactive
selectors = filters["selector"] if isinstance(filters["selector"], list) else [filters["selector"]]
for idx, query in enumerate(selectors):
selector = Selector(query, escape_slashes=False)
key = "{}_{}_selector_regex".format(prepend, idx)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for future - this would be cleaner with a f-string

@mariusandra mariusandra merged commit 90d16b2 into master Mar 30, 2021
@mariusandra mariusandra deleted the selector-list-fix branch March 30, 2021 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants