Votes
AR
23 days ago
👍
AR
Ali Ryder 🧑‍💼 Staff
over 3 years ago
Fixed

Bug in Coordinated Access (Families)

There's a bug in the Coordinated Access view having to do with families. It includes all group types and past group members instead of just limiting to present ones.

Here's the current code:

SELECT * FROM (SELECT people.PersonID, pg.GroupID, pg.GroupHeadYN, pg.DateStart,ROW_NUMBER() OVER(PARTITION BY people.PersonID ORDER BY pg.DateStart DESC) AS GroupRN
FROM HIFIS_People AS people
INNER JOIN HIFIS_People_Groups AS pg ON people.PersonID = pg.PersonID) groupsWithRN
WHERE groupsWithRN.GroupRN = 1) personRecentGroup

Here's what it should be:

SELECT * FROM (SELECT people.PersonID, pg.GroupID, pg.GroupHeadYN, pg.DateStart,ROW_NUMBER() OVER(PARTITION BY people.PersonID ORDER BY pg.DateStart DESC) AS GroupRN 
FROM HIFIS_People AS people
INNER JOIN HIFIS_People_Groups AS pg ON people.PersonID = pg.PersonID
INNER JOIN HIFIS_Groups AS g ON pg.GroupID = g.GroupID
WHERE g.GroupTypeID = 1 -- you need to only include family group types
AND pg.DateEnd IS NULL -- you need to only include current group memberships) groupsWithRN
WHERE groupsWithRN.GroupRN = 1) personRecentGroup
♾️Coordinated Access 👨‍👩‍👦Families 4.0.59 🐛Bug