After spending some time on this issue, I understand why I didn't try to fix it properly the first time. The data in the College xprofile field is out of date and internally inconsistent, in addition to being out of sync with our canonical list of CUNY campuses.
In addition, I found that the College filter only matches the xprofile value, but we don't actively set this xprofile value anymore because College was superseded by Positions. So we either need to rebuild the College filter so that it matches Positions, or ensure that Positions data is synced to College so as to be filterable with the current implementation. I've opted for the latter.
I've written a few wp-cli scripts that need to be run when 1.16 is deployed:
- cac-update-xprofile-college-names.php finds all instances of out-of-date college names in xprofile and updates them to the canonical name, so that they are properly matched when filtering in the directory
- cac-sync-position-to-college.php loops through all members and, where possible, syncs the relevant Positions data to College, so that the data becomes filterable with College in the directory
Related changesets:
- Rebuild directory filter to use cac_get_cuny_campuses(): https://github.com/cuny-academic-commons/cac/commit/ce143a8bac8fe2c5271faf195ec824700499a92b
- Sync Positions to College on profile save: https://github.com/cuny-academic-commons/cac/commit/7bf40c0ccd124693f6632203fa76c0cb638564e3