Project

General

Profile

Actions

Feature #12056

closed

SLU missing from /members/ filters

Added by Boone Gorges over 4 years ago. Updated over 4 years ago.

Status:
Resolved
Priority name:
Normal
Assignee:
-
Category name:
Directories
Target version:
Start date:
2019-11-08
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

Previously: #10978, #11087

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

Actions #1

Updated by Boone Gorges over 4 years ago

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

Actions #2

Updated by Matt Gold over 4 years ago

Wow -- thanks for addressing this, Boone

Actions

Also available in: Atom PDF