Skip to content

Commit

Permalink
Use LUP policy date range for lup claims
Browse files Browse the repository at this point in the history
LUP will extend past ECP, so we can't use the combined end date when
deciding what subjects to show for nqts who haven't entered an itt,
otherwise we render an empty list on the itt subject screen.
  • Loading branch information
rjlynch committed Nov 21, 2024
1 parent 47236ce commit 79ebfce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/journeys/additional_payments_for_teaching.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def selectable_subject_symbols(journey_session)
itt_year: journey_session.answers.itt_academic_year
)
end.flatten.uniq
elsif journey_session.answers.policy_year.in?(EligibilityCheckable::COMBINED_ECP_AND_LUP_POLICY_YEARS_BEFORE_FINAL_YEAR)
elsif journey_session.answers.policy_year.in?(Policies::LevellingUpPremiumPayments::POLICY_RANGE)
# they get the standard, unchanging LUP subject set because they won't have qualified in time for ECP by 2022/2023
# and they won't have given an ITT year
Policies::LevellingUpPremiumPayments.fixed_subject_symbols
Expand Down
3 changes: 2 additions & 1 deletion app/models/policies/levelling_up_premium_payments.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ module LevellingUpPremiumPayments

POLICY_START_YEAR = AcademicYear.new(2022).freeze
POLICY_END_YEAR = AcademicYear.new(2025).freeze
POLICY_RANGE = POLICY_START_YEAR..POLICY_END_YEAR

# Percentage of claims to QA
MIN_QA_THRESHOLD = 10
Expand Down Expand Up @@ -131,7 +132,7 @@ def fixed_subject_symbols
end

def subject_symbols(claim_year:, itt_year:)
return [] unless (POLICY_START_YEAR..POLICY_END_YEAR).cover?(claim_year)
return [] unless POLICY_RANGE.cover?(claim_year)

previous_five_years = (claim_year - 5)...claim_year

Expand Down

0 comments on commit 79ebfce

Please sign in to comment.