* CLDC-4202: No longer assume question numbers for years
the default logic is already a little confusing with the .max call, and we renumber most questions anyway between years
to simply this logic and make it less surprising, specify each year
all files should now specify 2023, 2024, 2025, 2026
* CLDC-4202: Account for removal of building type
see CLDC-4136, Q20 has been removed. renumber every question above 20 to be one lower
* CLDC-4202: Update household characteristics question nums
done separate as these question numbers are calculated
* CLDC-4202: Account for household characteristics renumbering
increase all after Q72 (previously Q64) armedforces.rb by 8
* CLDC-4202: Account for new referral question
* CLDC-4202: Update tests
* fixup! CLDC-4202: No longer assume question numbers for years
fix mistaken rent_type number
* CLDC-4202: Extract person question count to the form definition
* fixup! CLDC-4202: Extract person question count to the form definition
syntax error
* CLDC-4202: Extract hash logic to a common function
* CLDC-4202: Add a rake to populate new question numbers
we can run this rake to automatically add all the question numbers at the start of a new year, which should simplify the process a lot
* fixup! CLDC-4202: Add a rake to populate new question numbers
lint
* fixup! CLDC-4202: Extract person question count to the form definition
update tests
* fixup! CLDC-4202: Extract person question count to the form definition
lint
* fixup! CLDC-4202: Extract person question count to the form definition
also update age_known
* CLDC-4141: copy person questions refactor from CLDC-4142
* CLDC-4141: remove gender same as sex and replace gender identity q
* CLDC-4202: Use form person question count on sexrab
* CLDC-4202: Remove new question numbers from questions we don't ask anymore
* CLDC-4141: replace sex with sexrab where relevant for 2026
* fixup! CLDC-4202: Use form person question count on sexrab
update test
* fixup! CLDC-4202: Use form person question count on sexrab
page test too
* CLDC-4141: update download order
* CLDC-4140: remove sex from rowparser entirely
* CLDC-4140: keep sex in factory for now
* CLDC-4140: update household characteristics test
* CLDC-4140: update log variable spec
* CLDC-4202: Use relevant person_question_count in tests
* CLDC-4140: update csv export tests
* CLDC-4140: update validator tests
* CLDC-4140: update row-parser spec
* CLDC-4140: update csv-parser spec
* CLDC-4140: update export spec
* CLDC-4140: update log var defs spec
* CLDC-4140: update export spec
* CLDC-4140: update row parser spec
* CLDC-4140: update validator spec
* CLDC-4140: update csv parser spec
* CLDC-4143: Update gender retirement validations
rename functions as the new wording is more related to those that identify as male and any other option
* CLDC-4143: Add 2026 tests
* CLDC-4143: Update legacy json files
causes issues with some old tests
* CLDC-4143: Add error mappings for gender fields
* CLDC-4143: Add new gender age retirement soft validation
replaces the many check pages from previous years with a single one
shows if either of the previous ones would show
has agreed wording on ticket
* fixup! CLDC-4143: Update gender retirement validations
improve gender comment wording
* CLDC-4143: Update non males validation name
reference to 'soft validation' we found confusing
* fixup! CLDC-4143: Add new gender age retirement soft validation
update subsection specs
* CLDC-4140: update parsers post merge
* CLDC-4140: update tests after field renumbering
* CLDC-4140: update tests after field renumbering
* CLDC-4140: update spacing in to_2026_row
* CLDC-4140: update row parser spec field numbers
* CLDC-4140: update row parser field types
---------
Co-authored-by: Nat Dean-Lewis <nat.dean-lewis@softwire.com>
* Update question numbers for 2024 lettings
* Stub form start date in question tests
* Stub form start date in page tests
* Fix a typo
* Refactor default question number
* Refactor people question numbers
* Update some question numbers
* Update missing tests
* Update UPRN known question number
* Reorder questions, revert earnings number switch
* write tests that invalid answers are cleared when the start date of a log is changed
* clear invalid answers when the start date of a log is changed
* correct error
* undo previous work to take new direction
* write tests to cover updated functionality of method in form to reset values when they are not routed to or when answers to radio questions are no longer valid
* update method in form to improve readability and to ensure that when the answers to radio questions are no longer valid, taht they are cleared
* add back an "end" deleted by mistake and fix a linting issue
* make some minor copy and variable name corrections
* fix a broken test after updates
* remove bulk upload tests for adding validations to unpermitted values to radio questions, these are now being cleared before validation
* fix some tests broken after rebasing
* add step to age questions in sales
* remove list of question ids from the form that should not be cleared, this information should be held on the questions themselves
* rename variables
* rename instance variable to be nice and long
* minor changes after rebase
* feat: update scheme status so incomplete unless has active locations
* feat: update scheme typeahead text
* feat: reject incomplete locations
* feat: show completed/incomplete locations and validate when completed == 0
* feat: improve copy
* feat: change active -> completed
* feat: update scheme typeahead text
* feat: reject incomplete locations
* feat: show completed/incomplete locations and validate when completed == 0
* feat: improve copy
* feat: change to confirmed to add clarification in code
* feat: update scheme typeahead text
* feat: reject incomplete locations
* feat: show completed/incomplete locations and validate when completed == 0
* feat: improve copy
* feat: update scheme typeahead text
* feat: reject incomplete locations
* feat: only confirm locations if complete (old) AND save button clicked (new)
* feat: add unconfirmed scope
* refactor: complete -> confirm
* feat: fix tests
* feat: update scheme typeahead text
* feat: reject incomplete locations
* feat: show completed/incomplete locations and validate when completed == 0
* feat: improve copy
* feat: update scheme typeahead text
* feat: reject incomplete locations
* feat: only confirm locations if complete (old) AND save button clicked (new)
* feat: add unconfirmed scope
* refactor: complete -> confirm
* feat: fix tests
* feat: fix more tests
* feat: fix more tests
* refactor: rubocop
* refactor: rubocop
* refactor: rubocop
* feat: add tests for incomplete schemes
* refactor: linting
* feat: test incomplete count too
* feat: test unconfirmed locations aren't options in location_id
* feat: test validation
* feat: test when scheme is confirmed
* feat: test when scheme is confirmed for support user
* feat: test when location is confirmed
* refactor: linting
* refactor: consistent use of factorybot or not within a file
* feat: confirm locations when complete even if save button not clicked, and update tests
* refactor: simplify
* refactor: simplify
* refactor: move location helper methods to helpers
* refactor: move scheme helper methods to helpers
* refactor: formatting
* refactor: po response
* refactor: review response
* Spike for generating form
* Add remaining field mappings
* Add question attributes conditionally
* Display page attributes conditionally
* update subsection formatting
* Update section formatting
* fix generator
* Fix generator
* Update the form handler and form to create post 2021 forms programatically
* Initially generated and linted form
* Cover lettings sections and subsections wiht tests
* Cover age pages and questions with tests
* Add reusable age questions and adjust the tests
* Add a generic person age page using generic questions and adjust specs
* Multiline arrays in subsections
* Use generic person age page in household characteristics and remove unused pages/questions
* Combine and reduce tests
* Backfill duplicate rsnvac question
* Backfill repeating question
* Backfill repeating voiddate
* Backfill repeating tenancy question
* Backfill ethnic questions
* Backfill reason question
* Backfill prevten question
* Backfill referral questions
* Backfill chcharges questions
* Backfill brent questions
* Backfill scharge
* Backfill pscharge
* Backfill supcharg
* Backfill tcharge
* Backfill retirement value check question
* Make person known questions generic
* Make person gender identity questions generic
* Make relationship questions generic
* Make working situation questions generic
* make retirement check generic
* make pregnant household check generic
* Make pregnancy value checks generic, again
* Undo for and form handler changes
* Remove generate form task and service
* Remove empty headers, descriptions and initializers from pages
* Fix tests
* lint
This renames the case_log to lettings_log as everything we've written so
far has been geared towards lettings of social housing so it makes sense to
have the name describe this. This is also a precursor to adding in stuff for
sales logs (whatever shape that takes)
Co-authored-by: James Rose <james@jbpr.net>
* spiked extra values for location la
* test
* extra test
* extra spacing
* renamed argument
* refactored per Dans suggestions
* redundant tests
* redundant method
* redundant method
* redundant method - part 3
* redundant method - part 4
* Prevents location from being cleared when it has been changed alongside the scheme
* Handles visible IDs not being system unique
* Hides the location correctly
* Add location startdate column to the db
* Display the schemes with active locations only when selecting a scheme for a case log
* When selecting a location for case log, only show active locations
* Add startdate to the form
* only display the number of active locations in the appended text
* Compare date instead of time
* Put location questions and hints into a translation file
* lint
* content change