Skip to content

Conversation

@xavfernandez
Copy link
Contributor

@xavfernandez xavfernandez commented Jul 1, 2024

🤔 Pourquoi ?

Empêcher de saisir certains motifs de prolongations s'il y a déjà un certain nombre de prolongations.

🍰 Comment ?

🚨 À vérifier

  • Mettre à jour le CHANGELOG_breaking_changes.md ?

🏝️ Comment tester

Créer des PASS avec suffisamment de prolongations dans le passé et essayer de les prolonger.
J'essaierai de générer des PASS intéressant demain.

💻 Captures d'écran

@xavfernandez xavfernandez added 1-recette-jetable [Payé à l’heure] Crée une recette jetable sur CC modifié Modifié dans le changelog. labels Jul 1, 2024
@xavfernandez xavfernandez self-assigned this Jul 1, 2024
@github-actions
Copy link

github-actions bot commented Jul 1, 2024

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

@xavfernandez xavfernandez force-pushed the xfernandez/prolongation_rules branch 3 times, most recently from 48d3509 to 9d492ac Compare July 1, 2024 15:57
@xavfernandez xavfernandez marked this pull request as ready for review July 1, 2024 15:57
@xavfernandez xavfernandez force-pushed the xfernandez/prolongation_rules branch 2 times, most recently from 29d5f9c to 1c483ce Compare July 3, 2024 08:47
@xavfernandez xavfernandez force-pushed the xfernandez/prolongation_rules branch 2 times, most recently from b4fc872 to 4834620 Compare July 3, 2024 12:47
Copy link
Member

@francoisfreitag francoisfreitag left a comment

Choose a reason for hiding this comment

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

Les deux premiers commits : « faire et défaire, c’est toujours travailler ». 🙈

C’est très solide, et je m’attendais à un diff plus gros. Les petits encarts d’explication aident bien à comprendre 👍

enums.ProlongationReason.HEALTH_CONTEXT: {
"max_duration": datetime.timedelta(days=365),
"max_cumulative_duration": datetime.timedelta(days=365),
"help_text": "NE PAS UTILISER", # This value shouldn't appear anywhere but just in case
Copy link
Member

Choose a reason for hiding this comment

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

😄

Copy link
Contributor

@tonial tonial left a comment

Choose a reason for hiding this comment

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

Rien à ajouter par rapport à la relecture de @francoisfreitag si ce n'est que le 1er commit de la PR ne me semble pas super utile, vu que tu remets une valeur d'enum sous forme de dict dans le 2nd commit, et tu remets un label dans le 3e ^^

@xavfernandez xavfernandez force-pushed the xfernandez/prolongation_rules branch 4 times, most recently from 2a7c948 to bf390ea Compare July 4, 2024 15:05
Before this change you could sum the different cumulative duration (
3 years RQTH + 5 years SENIOR for a total of 8 years): now it won't be
possible to request a RQTH prolongation if there was already 3+ years of
prolongation for other reason

Hence, bump the max_cumulative_duration for COMPLETE_TRAINING to 10
years (since it is not supposed to have a maximum duration).
Those reasons don't have any cumulative duration limit.
- prevent the selection of unusable reason & add info
- add info on max date when lower than the expected duration
@xavfernandez xavfernandez force-pushed the xfernandez/prolongation_rules branch from c2207b2 to 32c484a Compare July 5, 2024 07:23
@xavfernandez xavfernandez added this pull request to the merge queue Jul 5, 2024
Merged via the queue into master with commit b3b5af7 Jul 5, 2024
@xavfernandez xavfernandez deleted the xfernandez/prolongation_rules branch July 5, 2024 08:02
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é Modifié dans le changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants