[mantis-327] Notifications : ajouter l'année dans l'objet des emails#147
Merged
Conversation
Les objets des mails de notification (distribution, besoin de volontaires, instructions bénévoles, abandon de rôle) n'affichaient pas l'année, ce qui rendait les dates ambiguës sur plusieurs saisons. Formatting.hDate() supportait déjà un paramètre optionnel `year`. Ce commit propage ce paramètre dans View.hDate() et passe `true` aux 5 appels concernant les objets de mails.
InterAMAP44
approved these changes
Jun 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contexte
Les objets des emails de notification affichaient les dates sans l'année
(ex : "Distribution du Mardi 24 Juin"), ce qui prête à confusion quand des
distributions sont planifiées sur plusieurs saisons.
Solution
Formatting.hDate()supportait déjà un paramètre optionnelyear=false.Il suffisait de le propager et de l'activer pour les sujets concernés.
Fichiers modifiés :
src/View.hx: ajout de?year:Bool = falsedanshDate()avec transmission àFormatting.hDate()src/controller/Cron.hx: passage deyear=truesur les 4 sujets (distribution ×2, besoin de volontaires, instructions bénévoles)src/service/VolunteerService.hx: passage deyear=truesur le sujet abandon de rôleAucun effet de bord : le paramètre étant optionnel avec
falsepar défaut, tous les autres appels (templates.mtt, messages d'erreur, corps de mails) sont inchangés.Comment tester
Déclencher chacun des 4 types de notification et vérifier que l'objet du mail contient bien l'année, ex : "Distribution du Mardi 24 Juin 2026".
🤖 Co-rédigé avec Claude