Skip to content

Employeur: Paramètre pour fermer les candidatures spontanées [GEN-758]#5698

Merged
calummackervoy merged 4 commits into
masterfrom
calum/close-spontaneous-applications
Mar 11, 2025
Merged

Employeur: Paramètre pour fermer les candidatures spontanées [GEN-758]#5698
calummackervoy merged 4 commits into
masterfrom
calum/close-spontaneous-applications

Conversation

@calummackervoy

Copy link
Copy Markdown
Contributor

🤔 Pourquoi ?

Aujourd’hui, il est possible de bloquer toutes les candidatures, ou d’ouvrir et fermer les candidatures pour une fiche de poste en particulier, mais il n’est pas possible de bloquer uniquement les candidatures spontanées.

Or, certaines SIAE ne traitent que les candidatures qui ne sont pas spontanées.
Il faudrait donc pouvoir choisir de bloquer uniquement les candidatures spontanées.

🚨 À vérifier

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

🏝️ Comment tester ?

Screenshot 2025-02-25 at 17 46 08
  • Avec un candidat, tester le moteur de recherche et le parcours de candidature
Screenshot 2025-02-26 at 13 40 09 Screenshot 2025-02-26 at 13 52 55

@calummackervoy calummackervoy added the ajouté Ajouté dans le changelog. label Feb 26, 2025
@calummackervoy calummackervoy self-assigned this Feb 26, 2025
@notion-workspace

Copy link
Copy Markdown

@calummackervoy calummackervoy force-pushed the calum/close-spontaneous-applications branch from 0dcb4cf to 07e7c8e Compare February 26, 2025 18:26
@calummackervoy calummackervoy marked this pull request as ready for review February 26, 2025 18:27
@calummackervoy

Copy link
Copy Markdown
Contributor Author

On devrait rajouter ce champ à la serialization du SIAE dans l'API ? https://github.com/gip-inclusion/les-emplois/blob/master/tests/api/siae_api/tests.py#L111

</form>
</td>
<td></td>
</tr>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@hellodeloo ce n'est pas la même taille que les autres <tr> sur mon navigateur, il y a une différence de quelques pixels. J'hésitais ajouter un taille fixe pour les <tr>. Qu'est-ce que tu penses ?

Screenshot 2025-02-25 at 14 27 10 Screenshot 2025-02-25 at 14 27 18

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.

Tu peux laisser comme ça. La différence est minime et il est préférable de ne pas bloquer les dimensions

Comment thread itou/companies/models.py
"Les candidatures spontanées peuvent être ouvertes pendant 90 jours. Une valeur nulle indique que "
"les candidatures spontanées sont bloquées."
),
)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

On a choisis un DateTimeField parce que prochainement ce champs sera mis en False automatiquement chaque 90 jours

Comment thread tests/www/apply/test_submit.py Outdated
),
)

def test_blocked_application(self, client):

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Petit bug corrigé au cours du PR. Je crois que ça vaut le fixe pour éviter un employeur frustré ?

Comment thread tests/www/companies_views/test_job_description_views.py Outdated
Comment thread tests/www/companies_views/test_job_description_views.py Outdated

@freeze_time("2025-01-01")
def test_toggle_spontaneous_applications(self, client, snapshot):
response = self._login(client, self.user)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Quelle abstraction bizarre que ce login 🙈. Il n’est pas de ton fait, donc rien à corriger, mais je suis surpris.

Comment thread itou/companies/models.py Outdated

@francoisfreitag francoisfreitag left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

J’ai un peu abrégé la fin de la revue, plus le temps. Désolé.

Comment thread itou/templates/companies/includes/_card_siae.html
Comment thread tests/www/search/tests.py Outdated
response = client.get(self.URL, {"city": guerande.slug})
assertContains(response, f"<h3>{company.display_name}</h3>")
assertContains(response, self.no_spontaneous_applications_str)
assertNotContains(response, "Cette structure vous intéresse ?")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Idéalement, on appairerait le texte de cet assertNotContains avec un assertContains pour être sûr que le texte apparaît bien sur la page.

@calummackervoy calummackervoy Mar 3, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Bonne idée ! J'ai proposé l'ajouter sur une assertion dans un autre test (# Has link to job description)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Je ne vois ni la nouvelle assertion ni une variable partagée contenant ce texte ?

Comment thread itou/www/apply/forms.py Outdated
Comment thread tests/www/apply/test_submit.py Outdated
Comment thread tests/www/apply/test_submit.py Outdated
Comment thread itou/www/apply/views/submit_views.py Outdated
Comment on lines +448 to +458
# Application must not be blocked by the employer at time of access
if not self.company.has_member(request.user):
if self.company.block_job_applications:
messages.error(request, apply_view_constants.ERROR_EMPLOYER_BLOCKING_APPLICATIONS)
return HttpResponseRedirect(self.get_redirect_url())
if (
not len(self.apply_session.get("selected_jobs", []))
and not self.company.is_open_to_spontaneous_applications
):
messages.error(request, apply_view_constants.ERROR_EMPLOYER_BLOCKING_SPONTANEOUS_APPLICATIONS)
return HttpResponseRedirect(self.get_redirect_url())

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Je ne suis pas sûr que la complexité en vaille le coup. Ça peut être frustrant pour les candidats et prescripteurs ayant effectué la saisie.
Un processus de candidature ne peut pas durer plus d’une semaine (la session expire), et on ne pourra pas en démarrer un nouveau si l’entreprise bloque les candidatures.
J’aurais laissé les processus de candidature démarrés avant que l’entreprise ne bloque les candidatures se terminer.

Au final, la question est quelle date fait foi : le début du processus de candidature ou sa fin ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ça mérite une discussion avec le métier sur le comportement à adopter. On peut leur dire que le fonctionnement actuel est un peu plus simple, mais qu'il peut surprendre les employeurs.

Dans tous les cas, c'est une question intéressante que tu as soulevé 😀

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@francoisfreitag

Copy link
Copy Markdown
Member

Les premiers commits me semblent très propres 👍

@calummackervoy calummackervoy force-pushed the calum/close-spontaneous-applications branch from 07e7c8e to 3e89747 Compare March 3, 2025 16:19
@calummackervoy calummackervoy force-pushed the calum/close-spontaneous-applications branch from 3e89747 to b18a5a9 Compare March 3, 2025 16:26
@calummackervoy calummackervoy added the 1-recette-jetable [Payé à l’heure] Crée une recette jetable sur CC label Mar 3, 2025
@github-actions

github-actions Bot commented Mar 3, 2025

Copy link
Copy Markdown

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

Comment thread itou/www/companies_views/views.py Outdated

@francoisfreitag francoisfreitag left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

En général ça me semble bien.

Il reste quelques retours de recette à traiter sur la carte.

Idéalement, le blocage du processus de candidature immédiatement à la désactivation d’un poste devrait être sorti dans une autre PR. Ça éviterait de mélanger les retours sur les deux fonctionnalités, et on pourrait intégrer l’une dès qu’elle est prête au lieu d’attendre que les deux ne soient prêtes.

Comment thread tests/www/apply/test_submit.py Outdated
Comment thread tests/www/companies_views/test_job_description_views.py Outdated
Comment thread tests/www/companies_views/test_job_description_views.py Outdated
Comment thread tests/www/search/tests.py Outdated
response = client.get(self.URL, {"city": guerande.slug})
assertContains(response, f"<h3>{company.display_name}</h3>")
assertContains(response, self.no_spontaneous_applications_str)
assertNotContains(response, "Cette structure vous intéresse ?")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Je ne vois ni la nouvelle assertion ni une variable partagée contenant ce texte ?

@francoisfreitag

Copy link
Copy Markdown
Member

On devrait rajouter ce champ à la serialization du SIAE dans l'API ? https://github.com/gip-inclusion/les-emplois/blob/master/tests/api/siae_api/tests.py#L111

Je dirais de ne pas t’embêter, tant qu’on n’a pas de demande.

@calummackervoy calummackervoy force-pushed the calum/close-spontaneous-applications branch from b18a5a9 to 005e222 Compare March 10, 2025 12:22
@calummackervoy

Copy link
Copy Markdown
Contributor Author

le blocage du processus de candidature immédiatement à la désactivation d’un poste devrait être sorti dans une autre PR

Je ne pense pas que ça fait partie du PR ni la carte, sauf j'ai mal compris ta description ?

@calummackervoy calummackervoy force-pushed the calum/close-spontaneous-applications branch from 005e222 to 6bb5397 Compare March 10, 2025 15:21
@francoisfreitag

Copy link
Copy Markdown
Member

le blocage du processus de candidature immédiatement à la désactivation d’un poste devrait être sorti dans une autre PR

Je ne pense pas que ça fait partie du PR ni la carte, sauf j'ai mal compris ta description ?

Je parlais de “Disallow job applications in progress if company blocks mid-process” qui devrait idéalement être sorti dans une autre PR.

@calummackervoy

Copy link
Copy Markdown
Contributor Author

Je parlais de “Disallow job applications in progress if company blocks mid-process” qui devrait idéalement être sorti dans une autre PR.

OK, c'est fait ! #5748

Comment thread tests/www/search/tests.py Outdated
Comment thread itou/companies/models.py Outdated
Comment thread itou/www/companies_views/views.py Outdated
@calummackervoy calummackervoy removed the 1-recette-jetable [Payé à l’heure] Crée une recette jetable sur CC label Mar 11, 2025
Via field Company.spontaneous_applications_open_since and control from job_description_list.html
Adds a banner if it's impossible to apply to an enterprise for this reason
@calummackervoy calummackervoy force-pushed the calum/close-spontaneous-applications branch from 8172933 to 3adb7cf Compare March 11, 2025 12:22
@calummackervoy calummackervoy added this pull request to the merge queue Mar 11, 2025
Merged via the queue into master with commit 3370247 Mar 11, 2025
@calummackervoy calummackervoy deleted the calum/close-spontaneous-applications branch March 11, 2025 12:40
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.

4 participants