Skip to content

Filter out faculty members from the people picker in the student research application form#161

Merged
wunc merged 5 commits intodevelopfrom
filters-profiles-not-accepting-students
Dec 17, 2024
Merged

Filter out faculty members from the people picker in the student research application form#161
wunc merged 5 commits intodevelopfrom
filters-profiles-not-accepting-students

Conversation

@betsyecastro
Copy link
Contributor

Adds the not-accepting-undergrad param to the search in the API index endpoint to only include the names of faculty members that are not marked as "Not accepting undergrad students" or that have not selected the option "Show not accepting students" on their profile page.

Issue #155

@betsyecastro betsyecastro requested a review from wunc August 19, 2024 15:20
@betsyecastro betsyecastro self-assigned this Aug 19, 2024
@betsyecastro betsyecastro changed the title 🐛 Filter out faculty members from the people picker in the student research application form Filter out faculty members from the people picker in the student research application form Aug 19, 2024
wunc added 2 commits December 16, 2024 17:12
The previous query scope was not properly accounting for the case where `show_not_accepting_students` was selected without `not_accepting_students`, due to how orWhereJsonDoesntContain works.
@wunc
Copy link
Collaborator

wunc commented Dec 16, 2024

Just for future reference on commit 963f8f8, SQL OR clauses can be tricky. I made the following table to figure out cases for the query. The first subquery takes care of the orange cases, and the second takes care of the purple case (which is the case that was not acting as expected in the previous iteration).

Screenshot 2024-12-16 at 5 17 41 PM

@wunc wunc merged commit f204108 into develop Dec 17, 2024
1 of 2 checks passed
@wunc wunc deleted the filters-profiles-not-accepting-students branch December 17, 2024 16:05
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.

Filter out faculty names that are not accepting students from people picker in student research application form

2 participants