-
Notifications
You must be signed in to change notification settings - Fork 24
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
Candidature : N'utiliser que les diagnostiques considérés comme valides pour la SIAE #4229
Candidature : N'utiliser que les diagnostiques considérés comme valides pour la SIAE #4229
Conversation
@@ -223,8 +223,8 @@ def with_jobseeker_eligibility_diagnosis(self): | |||
""" | |||
sub_query = Subquery( | |||
( | |||
EligibilityDiagnosis.objects.filter(job_seeker=OuterRef("job_seeker")) | |||
.order_by("-created_at") | |||
EligibilityDiagnosis.objects.valid() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je vais changer légèrement cette logique pour https://www.notion.so/plateforme-inclusion/Investigation-Cacher-les-diags-SIAE-aux-prescripteurs-lors-des-candidatures-3227290de5b248759a5fe43079868292
On va avoir un viewing_user
qui va décider de la visibilité d’un diag pour l’utilisateur courant. Mais a priori, je mettrais juste à jour cette section pour passer le viewing_user
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'était ma supposition, d'où ton ajout à la PR pour être sûr que ça allais plus ou moins dans le même sens ;).
EligibilityDiagnosis.objects.filter(job_seeker=OuterRef("job_seeker")) | ||
.order_by("-created_at") | ||
EligibilityDiagnosis.objects.valid() | ||
.for_job_seeker_and_siae(job_seeker=OuterRef("job_seeker"), siae=OuterRef("to_company")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je me demande si on ne voudrait pas prendre le diagnostique du prescripteur en premier, comme dans EligibilityDiagnosis.objects.last_considered_valid()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sans doute, mais alors faut aussi modifier le .eligibility_validated()
juste en dessous, ou mettre le tri directement dans .for_job_seeker_and_siae()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit “tests: Refactor eligibility diagnosis factories” : ça vaudrait le coup d’expliquer ce qui a changé (dans les grandes lignes) dans le corps du commit.
a916514
to
fc26640
Compare
fc26640
to
b2952c2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit “tests: Refactor eligibility diagnosis factories” : ça vaudrait le coup d’expliquer ce qui a changé (dans les grandes lignes) dans le corps du commit.
C'est fait.
@@ -223,8 +223,8 @@ def with_jobseeker_eligibility_diagnosis(self): | |||
""" | |||
sub_query = Subquery( | |||
( | |||
EligibilityDiagnosis.objects.filter(job_seeker=OuterRef("job_seeker")) | |||
.order_by("-created_at") | |||
EligibilityDiagnosis.objects.valid() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'était ma supposition, d'où ton ajout à la PR pour être sûr que ça allais plus ou moins dans le même sens ;).
EligibilityDiagnosis.objects.filter(job_seeker=OuterRef("job_seeker")) | ||
.order_by("-created_at") | ||
EligibilityDiagnosis.objects.valid() | ||
.for_job_seeker_and_siae(job_seeker=OuterRef("job_seeker"), siae=OuterRef("to_company")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sans doute, mais alors faut aussi modifier le .eligibility_validated()
juste en dessous, ou mettre le tri directement dans .for_job_seeker_and_siae()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pourquoi c'est en draft ? Ça me semble déjà bien. Et les 2 premiers commits de nettoyage pourraient être mergés 👍
b2952c2
to
53c2fe8
Compare
9455392
to
aa2dec6
Compare
Normalement on est tout bon ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il n'y a pas les snapshots de test_list_for_prescriber à supprimer à tout hasard ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dans le commit je rename le fichier justement ;) : https://github.com/gip-inclusion/les-emplois/pull/4229/files#diff-1eb8c3b75081f56a790b552c18d67947156ccfd6a7f5f65bfc1770aca321d543
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
J'ai le cerveau cramé... Ouais je comprend pas pourquoi --snapshot-update
le supprime pas 🤔.
- Create an abstract factory to follow the abstract model logic - Create and use a prefixed factory for IAE diagnosis - Replace behavioral factories (`Expired`, `MadeBySiae`) with traits - Delete the unused `AdministrativeCriteriaFactory()`
aa2dec6
to
d0a766f
Compare
Note
with_jobseeker_eligibility_diagnosis()
est toujours bonne et donc doit-on la garder ? Car ça me semble bizarre (et capillotracté) d'afficher une info alors que celle-ci n'est pas présente sur la candidature.🤔 Pourquoi ?
Suite à un retour de recette pour #4197.
Ne pas afficher un diagnostique considéré comme non-valide, typiquement un diagnostique fait par la SIAE A alors que la candidature est pour la SIAE B.
🏝️ Comment tester
Avec les tests