Open
Conversation
Adds logic to create different training hours based on the current academic year
There was a problem hiding this comment.
Pull request overview
This PR introduces configurable mentor training-hour caps by academic year (notably reducing the initial training cap), and updates user-facing copy/tests to reflect the new wording and limits.
Changes:
- Adds
Claims::TrainingHoursto centralise initial/refresher hour caps by academic-year period (with model specs). - Updates
Claims::TrainingAllowanceto derive total hours fromClaims::TrainingHoursinstead of hard-coded constants (and expands specs). - Updates wizard/view copy and locale strings to interpolate the initial-hours cap, plus updates grant conditions content and related specs.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| spec/wizards/claims/add_claim_wizard/mentor_training_step_spec.rb | Updates refresher hint text (“up to …”). |
| spec/system/claims/schools/claims/claims_user_creates_a_claim_for_a_mentor_with_a_previous_year_claim_spec.rb | Updates system spec hint text to match copy change. |
| spec/models/claims/training_hours_spec.rb | Adds tests for Claims::TrainingHours hour caps by period. |
| spec/models/claims/training_allowance_spec.rb | Expands coverage for pre/post cutover initial/refresher allowances. |
| config/locales/en/wizards/claims/invalid_provider_wizard.yml | Parameterises initial-hours cap and provider name in the warning copy. |
| config/locales/en/wizards/claims/add_claim_wizard.yml | Parameterises initial-hours cap in refresher hint and “no mentors” copy. |
| config/locales/en/components/claims/add_claim_wizard/mentor_step/disclaimer_component.yml | Parameterises initial-hours cap in disclaimer copy. |
| app/wizards/claims/add_claim_wizard/mentor_training_step.rb | Supplies num_initial_hours when rendering refresher hint. |
| app/views/wizards/claims/invalid_provider_wizard/_unable_to_assign_provider_step.html.erb | Supplies num_initial_hours to updated translation. |
| app/views/wizards/claims/add_claim_wizard/_no_mentors_step.html.erb | Supplies num_initial_hours to updated translation. |
| app/views/claims/schools/_grant_conditions.html.erb | Updates grant conditions copy to 2025/26 and 16-hour cap. |
| app/models/claims/training_hours.rb | Adds new policy object for hour caps by academic-year period. |
| app/models/claims/training_allowance.rb | Uses Claims::TrainingHours for totals instead of constants. |
| app/components/claims/add_claim_wizard/mentor_step/disclaimer_component.rb | Supplies num_initial_hours to updated translation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Deployments
|
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.
Context
With the upcoming academic year the claim hours are changing, however we still need to be able to calculate claims for previous years, therefore we must add variable claim hours.
Changes proposed in this pull request
Link to Trello card
https://trello.com/c/8Ntbut3o/321-updating-logic-for-hours-you-can-claim-for-initial-and-refresher-training