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

Employeur: Réduction de la durée de validité du diagnostic d’éligibilité à 92 jours [GEN-2276] #5285

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

francoisfreitag
Copy link
Contributor

@francoisfreitag francoisfreitag commented Dec 17, 2024

🤔 Pourquoi ?

Aligner la durée de validité des diagnostics employeur avec la durée de validité des justificatifs (3 mois).

🏝️ Comment tester

  1. Se connecter en tant qu’employeur
  2. Créer une candidature pour un nouveau candidat
  3. Dans le parcours d’acceptation de candidature, effectuer un diagnostic d’éligibilité
  4. Vérifier dans l’admin que le diagnostic d’éligibilité expire dans 92j.

Vérifier que les diagnostics IAE PH et GEIQ continuent de durer 6 mois.

💻 Captures d'écran

Instead of falling back to the save method, directly specify the
expiration date.

That change facilitates an upcoming feature where the diagnosis validity
period will be based on the author kind.

The tests were expecting a validity of 6 months after creation. The
eligibility factories now handle that.
Instead of merging dicts, set the keys directly. That’s clearer and
faster.

Also, it will help conditionally inserting an entry later.
Employers must be able to justify administrative criteria they selected
for an IAE hire. The proof is valid for 3 months (we decided 92 days).

Matching the eligibility duration to proof validity period has avoids a
number of edge cases, such has a hire that starts in 5 months with an
RSA criteria: the employer does not have a proof that the candidate will
still be eligible in 2 months.

With administrative criteria being certified, the certification period
now matches the eligibility diagnosis duration.

The `hiring_start_at` remains unchecked, because the subject is pretty
complex. Tracked with
https://www.notion.so/plateforme-inclusion/S-assurer-que-les-dates-d-embauche-en-SIAE-correspondent-une-p-riode-de-validit-du-diagnostic-158e8fa5c35b80959d71c3642d33512e
@francoisfreitag francoisfreitag self-assigned this Dec 17, 2024
@francoisfreitag francoisfreitag changed the title Employeur: Réduction de la durée de validité du diagnostic d’éligibilité à 92 jours Employeur: Réduction de la durée de validité du diagnostic d’éligibilité à 92 jours [GEN-2276] Dec 17, 2024
@francoisfreitag francoisfreitag added the 1-recette-jetable [Payé à l’heure] Crée une recette jetable sur CC label Dec 17, 2024
Copy link

🥁 La recette jetable est prête ! 👉 Je veux tester cette PR !

@@ -2879,6 +2886,7 @@ def test_hire_as_company(self, client):
assertTemplateUsed(response, "approvals/includes/box.html")
assert response.status_code == 200

@freeze_time()
Copy link
Collaborator

Choose a reason for hiding this comment

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

👀

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pourquoi ces yeux ?

Copy link
Collaborator

@celine-m-s celine-m-s Dec 18, 2024

Choose a reason for hiding this comment

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

Ah pardon, j'ai cru que c'étaient des oublis. Je me demandais pourquoi utiliser freeze_time sans passer de date en paramètre. Je n'ai rien vu dans la doc à ce sujet.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope, c’est voulu parce que je hardcode la date attendue (à +92j). C’est pour éviter des échecs autour de minuit.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah d'accord ! Merci !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-recette-jetable [Payé à l’heure] Crée une recette jetable sur CC modifié
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants