Class Year Selection
under review
J
Jim Moudy
Class year is currently showing on the profile picture in the directory, and is also used in "people in my class" quicklink. This class year being used is the most recent year on the profile. The feedback we are getting from our alumni is that they generally affiliate with the FIRST class, but they may have returned to the institution for a second degree or post-graduate degree. It would be nice to have some sort of data-driven selection of class year rather than it simply be the most recent class year.
Z
Zachary Curtis
This feature would be very impactful for our constituents, who associate strongly with their class year and could be upset by seeing a 'wrong' class year displayed.
This should be an easy change. Either AlmaBase is doing the selection on the backend (which looks something like):
SELECT *
FROM degrees
WHERE person_id = :id
ORDER BY year DESC
LIMIT 1;
Changing this to ORDER BY year ASC gives you the behavior we want.
If they’re doing it on the frontend, it probably looks like:
type DegreeRecord = {
university: string;
degree: string;
year: number;
};
function getMaxDegreeByYear(degrees: DegreeRecord[]): DegreeRecord | null {
if (degrees.length === 0) return null;
return degrees.reduce((max, current) =>
current.year > max.year ? current : max
);
}
Wherein we just need to change the function to:
type Extremum = "min" | "max";
function getDegreeByYearExtremum(
degrees: DegreeRecord[],
extremum: Extremum
): DegreeRecord | null {
if (degrees.length === 0) return null;
return degrees.reduce((best, current) => {
switch (extremum) {
case "max":
return current.year > best.year ? current : best;
case "min":
return current.year < best.year ? current : best;
default:
return best;
}
});
}
The backend change is less than four characters, the frontend change is eight additional lines of code. I think it would be hard to find another change that has more impact per line of code. Thank you.
Sahil Mallick
marked this post as
under review
J
Jim Moudy
We typically want the year of the first degree earned to be the class reflected on the profile and in searches. It would be nice if there was some selection by the user.
A
Angelina Christine Gilbert
Hi Jim Moudy, Was this Class Year situation resolved for you? We are in implementation and the class year is a major issue for our institution. Hoping you can provide insight how you got past this. Thanks!
Kanhai Shah
Jim Moudy We do allow data driven decision to determine class year but that is not exposed to customer through UI. Let me know how do you want to determine the class year and we will add this on backend.
A
Angelina Christine Gilbert
Kanhai Shah is a backend "data driven decision" for Class year still an option? We would like to pursue this as an option. Thank you.