Feature #12056
closedSLU missing from /members/ filters
0%
Description
A number of newer campuses, including CUNY School of Labor and Urban Studies, do not appear under the 'College' filter on /members/. This is because this list uses the 'College' xprofile field as a source of truth, and adds items not on that list only according to a hardcoded whitelist. See https://github.com/cuny-academic-commons/cac/commit/2ae5684ab7827db89ce8e668bf187d34d3b3131d. This should be changed so that the official CUNY campus list cac_get_cuny_campuses()
is the source of truth.
Files
Updated by Boone Gorges about 5 years ago
- File cac-sync-position-to-college.php cac-sync-position-to-college.php added
- File cac-update-xprofile-college-names.php cac-update-xprofile-college-names.php added
- Status changed from New to Resolved
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