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

Adjust User group search to mimic user search #4291

Merged
merged 8 commits into from
Mar 18, 2024

Conversation

yuenmichelle1
Copy link
Collaborator

@yuenmichelle1 yuenmichelle1 commented Feb 21, 2024

Part of User Groups stats effort. See: FE Stats Project Board here: https://github.com/orgs/zooniverse/projects/36/views/2?pane=issue&itemId=41487549

Want is to mimic user_group admin search to mimic that of user search. (But in our case instead of searching by user.login we search by user_group.display_name (not a unique field)).

Compared to the last migration where we added a tsv column. https://github.com/zooniverse/panoptes/blob/master/db/migrate/archive/20151210134819_add_tsvector_to_projects.rb there are a couple differences:

  • with the addition of strong_migrations gem post this ^ 2015 migration, we now have to add safety_assured on the creation of sql trigger
  • I chose to separate each operation (create the column, add it as a generalized inverted index, create the sql trigger) into its own migration file.

Review checklist

  • First, the most important one: is this PR small enough that you can actually review it? Feel free to just reject a branch if the changes are hard to review due to the length of the diff.
  • If there are any migrations, will they the previous version of the app work correctly after they've been run (e.g. the don't remove columns still known about by ActiveRecord).
  • If anything changed with regards to the public API, are those changes also documented in the apiary.apib file?
  • Are all the changes covered by tests? Think about any possible edge cases that might be left untested.

@yuenmichelle1 yuenmichelle1 requested a review from zwolf February 21, 2024 22:52
@yuenmichelle1
Copy link
Collaborator Author

Pinging @mcbouslog so that he and I can test against zooniverse/Panoptes-Front-End#6968 once this change is merged into staging

Copy link
Member

@zwolf zwolf left a comment

Choose a reason for hiding this comment

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

LGTM

@yuenmichelle1 yuenmichelle1 merged commit a637729 into master Mar 18, 2024
8 checks passed
@yuenmichelle1 yuenmichelle1 deleted the user_group_search_mimic_user_search branch March 18, 2024 17:57
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.

2 participants