alphagov / calculators

Serves the Child benefit tax calculator on GOV.UK
https://docs.publishing.service.gov.uk/apps/calculators.html
MIT License
11 stars 13 forks source link

Limit potential tax years to those with defined rates #1027

Closed benjamineskola closed 3 years ago

benjamineskola commented 3 years ago

Limit potential tax years to those with defined rates

A situation can occur where the option for a particular tax year is displayed even before the rates have been defined for it. It should be limited to within this range. (This likely occurs in a new year, because we decide the years to show based on the current calendar year, not the current tax year, but rates are based on tax years).

This was exposed by #1023, which altered the validation — but it is likely that the radio option for a tax year was incorrectly displayed even before that.

https://trello.com/c/pqJGso5N/2341-fix-exceptions-in-calculators

benjamineskola commented 3 years ago

Have realised this will break again when the 2021 rates are added, so going to address that before merging.