-
Notifications
You must be signed in to change notification settings - Fork 412
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
feat: search identities by dashboard alias #4569
feat: search identities by dashboard alias #4569
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Skipped Deployments
|
Uffizzi Preview |
Docker builds report
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great 🥇
…rd-alias # Conflicts: # api/tests/integration/edge_api/identities/test_edge_identity_featurestates_viewset.py
@matthewelwell Is there a way to make this an or filter (maybe it is and I'm missing how it works)? The reason I ask is that it'd be super clunky to have to specify whether we're searching by id or alias especially in the case where I only have a few aliases and the rest of the time I search by id. |
We'll, yes, technically I could. But I think the UX should force the user to choose what they're searching on. The two things will always be very different fields anyway, so I'm not sure what your concern is? |
I think it's just annoying/clunky to have to select what to search on vs just typing a value, I don't think they should really have to tell flagsmith they are wanting to search for an alias vs id especially given that they'd have very different values. I.e. if I type kyle id always want to be searching for an alias, if I paste an id I'd always want to search by id. In both those cases I think I'd often see no results then realise I have to change a filter. |
@kyle-ssg as discussed on slack, adding search across both entities is technically challenging on the API (since it requires sending 2 separate search requests to dynamo). Let's implement the selector for now and add this as an improvement. |
Changes
Adds functionality to search edge identities by a dashboard alias.
Note: requires the relevant index to be created on the
flagsmith_identities
table in dynamodb.How did you test this code?
I have manually tested this PR by running the API pointed to staging DB and dynamo tables, running the FE and testing searching for
dashboard_alias:...
.I have also added some new tests to the python unit tests for specific use cases.