Skip to content

Vie privée : Notifier puis archiver les comptes candidats sans candidature inactifs depuis plus de 12 mois [GEN-1339] - #5861

Merged
vincentporte merged 5 commits into
masterfrom
vp/GEN-1339_archivage
Apr 22, 2025
Merged

Vie privée : Notifier puis archiver les comptes candidats sans candidature inactifs depuis plus de 12 mois [GEN-1339]#5861
vincentporte merged 5 commits into
masterfrom
vp/GEN-1339_archivage

Conversation

@vincentporte

@vincentporte vincentporte commented Apr 1, 2025

Copy link
Copy Markdown

🤔 Pourquoi ?

RGPD
Carte notion limitée à la notification et l'anonymisation des candidats sans candidature, ni Pass, ni Diag et inactifs depuis 12 mois.

🍰 Comment ?

  1. selectionner les jobseeker notifiables
  2. notifier ces jobseeker et valoriser notified_before_deletion_at dans User
  3. selectionner les jobseeker archivables
  4. notifier ces jobseeker et les passer à l'état inactif
  5. transferer et anonymiser les donnees utilisateurs inactif dans une table archive et supprimer l'instance d'origine

🚨 À vérifier

NON Mettre à jour le CHANGELOG_breaking_changes.md ?
NON Ajouter l'étiquette « Bug » ?

🏝️ Comment tester ?

Les instructions pour reproduire le problème, les profils de test, le parcours spécifique à utiliser, etc. Si vous disposez d'une recette jetable, mettre l'URL pour tester dans cette partie.

💻 Captures d'écran

@vincentporte vincentporte added the ajouté Ajouté dans le changelog. label Apr 1, 2025
@vincentporte vincentporte self-assigned this Apr 1, 2025
@vincentporte
vincentporte marked this pull request as draft April 1, 2025 13:44
@vincentporte vincentporte changed the title Vie privée : Archiver les comptes candidats sans candidature acceptée et inactifs depuis plus de 13 mois Vie privée : Archiver les comptes candidats sans candidature acceptée et inactifs depuis plus de 13 mois [GEN-1339] Apr 2, 2025
@vincentporte
vincentporte force-pushed the vp/GEN-1339_archivage branch 2 times, most recently from d5b37cf to c02ace8 Compare April 2, 2025 14:39
@vincentporte
vincentporte marked this pull request as ready for review April 2, 2025 14:39
@vincentporte vincentporte changed the title Vie privée : Archiver les comptes candidats sans candidature acceptée et inactifs depuis plus de 13 mois [GEN-1339] Vie privée : Notifier les comptes candidats sans candidature acceptée et inactifs depuis plus de 12 mois [GEN-1339] Apr 2, 2025
@vincentporte vincentporte changed the title Vie privée : Notifier les comptes candidats sans candidature acceptée et inactifs depuis plus de 12 mois [GEN-1339] Vie privée : Notifier les comptes candidats sans candidature acceptée et inactifs depuis plus de 12 mois [GEN-1339] (part-1) Apr 2, 2025
@vincentporte vincentporte changed the title Vie privée : Notifier les comptes candidats sans candidature acceptée et inactifs depuis plus de 12 mois [GEN-1339] (part-1) Vie privée : Notifier les comptes candidats sans candidature acceptée et inactifs depuis plus de 12 mois [GEN-1339] (1/2) Apr 2, 2025
@vincentporte
vincentporte force-pushed the vp/GEN-1339_archivage branch from c02ace8 to 9ae91a5 Compare April 2, 2025 14:41
@vincentporte
vincentporte requested a review from EwenKorr April 2, 2025 14:42
@vincentporte vincentporte changed the title Vie privée : Notifier les comptes candidats sans candidature acceptée et inactifs depuis plus de 12 mois [GEN-1339] (1/2) Vie privée : Notifier puis archiver les comptes candidats sans candidature inactifs depuis plus de 12 mois [GEN-1339] Apr 3, 2025
@vincentporte
vincentporte marked this pull request as draft April 3, 2025 12:13
@vincentporte
vincentporte force-pushed the vp/GEN-1339_archivage branch from 9ae91a5 to 6ee751f Compare April 3, 2025 14:47
Comment thread itou/users/management/commands/notify_deactivate_inactive_jobseekers.py Outdated
Comment thread itou/users/management/commands/notify_deactivate_inactive_jobseekers.py Outdated
Comment thread itou/archive/management/commands/archive_users.py Outdated
Comment thread itou/archive/management/commands/archive_users.py Outdated
Comment thread itou/archive/management/commands/archive_users.py Outdated
Comment thread itou/archive/models.py Outdated
Comment thread itou/archive/models.py Outdated
Comment thread itou/templates/account/email/email_deactivate_jobseeker_body.txt Outdated
Comment thread itou/users/management/commands/notify_deactivate_inactive_jobseekers.py Outdated
Comment thread itou/users/management/commands/notify_deactivate_inactive_jobseekers.py Outdated
Comment thread itou/users/models.py Outdated
Comment thread itou/users/management/commands/notify_deactivate_inactive_jobseekers.py Outdated
@vincentporte
vincentporte force-pushed the vp/GEN-1339_archivage branch 8 times, most recently from 18c1a83 to 4029be7 Compare April 9, 2025 14:52
Comment thread tests/companies/__snapshots__/test_admin.ambr Outdated
Comment thread tests/www/apply/__snapshots__/test_list_for_job_seeker.ambr Outdated
Comment thread itou/users/notifications.py
Comment thread itou/users/management/commands/notify_deactivate_inactive_jobseekers.py Outdated
Comment thread itou/users/management/commands/notify_deactivate_inactive_jobseekers.py Outdated
Comment thread itou/users/management/commands/notify_deactivate_inactive_jobseekers.py Outdated
Comment thread itou/archive/models.py Outdated
Comment thread itou/archive/management/commands/archive_jobseekers.py Outdated
Comment thread itou/archive/management/commands/archive_jobseekers.py Outdated
Comment thread itou/archive/management/commands/archive_jobseekers.py Outdated
@vincentporte
vincentporte force-pushed the vp/GEN-1339_archivage branch from 4029be7 to cc4b79f Compare April 16, 2025 08:45
@vincentporte
vincentporte marked this pull request as ready for review April 16, 2025 08:47
@vincentporte
vincentporte force-pushed the vp/GEN-1339_archivage branch from cc4b79f to 397455f Compare April 16, 2025 08:49
@vincentporte
vincentporte force-pushed the vp/GEN-1339_archivage branch from c4f5ba2 to 0a1c8d3 Compare April 16, 2025 10:52

@xavfernandez xavfernandez left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je me demande si au final on gagne tant que cela de passer par 2 commandes.
On pourrait potentiellement tout regrouper dans une commande dans l'app archive qui évitera la réutilisation un peu bancale du is_active.

Comment thread itou/archive/management/commands/archive_jobseekers.py Outdated
Comment thread itou/archive/management/commands/archive_jobseekers.py Outdated
Comment thread itou/archive/management/commands/archive_jobseekers.py Outdated
Comment thread itou/archive/management/commands/archive_jobseekers.py Outdated
Comment thread itou/archive/models.py Outdated
Comment thread itou/users/management/commands/notify_deactivate_inactive_jobseekers.py Outdated
Comment thread itou/users/management/commands/notify_deactivate_inactive_jobseekers.py Outdated
Comment thread itou/users/management/commands/notify_deactivate_inactive_jobseekers.py Outdated
Comment thread itou/users/management/commands/notify_deactivate_inactive_jobseekers.py Outdated
Comment thread itou/users/management/commands/notify_deactivate_inactive_jobseekers.py Outdated
@vincentporte

Copy link
Copy Markdown
Author

Je me demande si au final on gagne tant que cela de passer par 2 commandes. On pourrait potentiellement tout regrouper dans une commande dans l'app archive qui évitera la réutilisation un peu bancale du is_active.

C'est tentant ! L'idée de garder les deux traitements séparés permet de spécialiser les commandes par type d'utilisateurs sur ceux à selectionner, puis de laisser une grosse commande achive_users faire tout le traitement d'anonymisation.
Qu'en penses-tu ?

@vincentporte
vincentporte force-pushed the vp/GEN-1339_archivage branch 3 times, most recently from e3bfb19 to c299597 Compare April 16, 2025 22:12
@vincentporte
vincentporte force-pushed the vp/GEN-1339_archivage branch from c299597 to 2b6574b Compare April 17, 2025 07:31
Comment thread itou/communications/__init__.py
Comment thread config/settings/base.py
Comment thread itou/archive/management/commands/notify_archive_jobseekers.py Outdated
Comment thread itou/archive/management/commands/notify_archive_jobseekers.py Outdated
Comment thread itou/archive/management/commands/notify_archive_jobseekers.py Outdated
Comment thread tests/archive/tests_management_command.py Outdated
Comment thread tests/archive/tests_management_command.py Outdated
Comment thread tests/archive/tests_management_command.py Outdated
Comment thread tests/archive/tests_management_command.py Outdated
Comment thread tests/archive/tests_management_command.py Outdated
Comment thread tests/users/factories.py Outdated
Comment thread tests/users/factories.py Outdated
Comment thread tests/users/test_models.py Outdated
Comment thread tests/users/test_models.py Outdated
Comment thread tests/archive/tests_management_command.py Outdated
Comment thread tests/archive/tests_management_command.py Outdated
Comment thread tests/archive/tests_management_command.py Outdated
Comment thread tests/archive/tests_management_command.py Outdated
Comment thread tests/archive/tests_management_command.py Outdated
Comment thread tests/archive/tests_management_command.py Outdated
Comment thread tests/archive/tests_management_command.py Outdated
Comment thread tests/archive/tests_management_command.py Outdated
@vincentporte
vincentporte force-pushed the vp/GEN-1339_archivage branch from d2fda8d to 9a181bc Compare April 17, 2025 16:22
Comment thread tests/archive/__snapshots__/tests_management_command.ambr
Comment thread tests/archive/tests_management_command.py Outdated
Comment thread tests/archive/tests_management_command.py Outdated
Comment thread tests/archive/tests_management_command.py Outdated
Comment thread tests/archive/tests_management_command.py Outdated
Comment thread tests/archive/tests_management_command.py Outdated
Comment thread tests/archive/tests_management_command.py Outdated
@vincentporte
vincentporte force-pushed the vp/GEN-1339_archivage branch from 9a181bc to b374b2c Compare April 22, 2025 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ajouté Ajouté dans le changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants