Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dashboard): statistiques avec filtre 'Date de sortie de file active' où certaines personnes toujours dans la file active avaient une date de sortie de file active définie malgré tout, perturbant les statistiques #1667

Merged
merged 1 commit into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions dashboard/src/recoil/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ export const itemsGroupedByPersonSelector = selector({
formattedPhoneNumber: person.phone?.replace(/\D/g, ''),
interactions: [person.followedSince || person.createdAt],
lastUpdateCheckForGDPR: person.followedSince || person.createdAt,
// BUG FIX: we used to set an `outOfActiveListDate` even if `outOfActiveList` was false.
// https://github.com/SocialGouv/mano/blob/34a86a3e6900b852e0b3fe828a03e6721d200973/dashboard/src/scenes/person/OutOfActiveList.js#L22
// This was causing a bug in the "person suivies" stats, where people who were not out of active list were counted as out of active list.
outOfActiveListDate: person.outOfActiveList ? person.outOfActiveListDate : null,
};
if (!person.history?.length) continue;
for (const historyEntry of person.history) {
Expand Down
1 change: 0 additions & 1 deletion dashboard/src/scenes/person/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export default function View() {
const preparePersonForEncryption = usePreparePersonForEncryption();

if (!person) {
toast.error("Cette personne n'existe pas, ou vient d'être supprimée par un(e) autre utilisateur(rice) de votre organisation");
history.push('/person');
return null;
}
Expand Down
Loading