* 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-4151: Note deprecations of existing referral questions
* CLDC-4151: Add new cols to lettings log model
* CLDC-4151: Add new referrals questions
* CLDC-4151: Remove referral value check
* CLDC-4151: Add new fields to bulk upload
use new fields as presented in bulk upload
* CLDC-4151: Update tests
also add bulk upload file to test with
* CLDC-4151: Ignore tests failing for later tickets
* fixup! CLDC-4151: Add new referrals questions
start q nums from 2026
* CLDC-4151: Add model tests for new questions
* fixup! CLDC-4151: Add new fields to bulk upload
export old_visible_id
set MAX_COLUMNS correctly
check .prp? for prp cols
* fixup! CLDC-4151: Update tests
clarify tests that may update
* fixup! CLDC-4151: Add new fields to bulk upload
handle the old_visible_id not existing
use override org ID only for the output owning ID. it's only passed as eg ORG1
* CLDC-4151: Add new questions to log factory
* fixup! CLDC-4151: Add new fields to bulk upload
leave field_131 validations till later
* CLDC-4188: Add LA flow
splits the referral_register question and pages into two, as its not easy to have the answers be dependent
if the owning organisation changes type, reset the referral register question. the other questions do not need to be reset as they are no longer routed to
* CLDC-4188: Infer referral_register for renewals
needs a new dependencies array for 2026
this handles inferring as well as clearing inferred answers if the prior answer changes
* CLDC-4188: Add validation between prevten and referral_register
block two other validations from previous years
* CLDC-4188: Update tests
* CLDC-4188: Ignore tests failing for future tickets
* CLDC-4188: Update existing tests
needed as should_reset_referral_register? calls a .find()
* fixup! CLDC-4188: Add validation between prevten and referral_register
use .prp?
improve grammar
* fixup! CLDC-4188: Infer referral_register for renewals
extract dependencies to common list
* fixup! CLDC-4188: Update tests
use before and context blocks better
* fixup! CLDC-4188: Update tests
lint
* fixup! CLDC-4188: Update tests
remove unneeded referral_type set
* CLDC-4189: Add PRP flow
* CLDC-4189: Update validation between prevten and referral_register
* CLDC-4189: Add tests
* fixup! CLDC-4189: Add PRP flow
fix typo
Co-authored-by: Oscar Richardson <116292912+oscar-richardson-softwire@users.noreply.github.com>
* fixup! CLDC-4189: Add tests
fix typo
* fixup! CLDC-4189: Add tests
fix missing cases in page specs
use a loop and before blocks for household validation tests
* CLDC-4189: Ensure log is not classed as generan needs if prevten isnt answered
* fixup! CLDC-4189: Add tests
add cases for other internal transfer flow
* CLDC-4151: Add final question numbers
* fixup! CLDC-4189: Update validation between prevten and referral_register
include new code 40 from CLDC-4149
* fixup! CLDC-4151: Add final question numbers
reinstate fallback
* CLDC-4190: Q84 Referral BU validations (#3155)
* CLDC-4151: Note deprecations of existing referral questions
* CLDC-4151: Add new cols to lettings log model
* CLDC-4151: Add new referrals questions
* CLDC-4151: Remove referral value check
* CLDC-4151: Add new fields to bulk upload
use new fields as presented in bulk upload
* CLDC-4151: Update tests
also add bulk upload file to test with
* CLDC-4151: Ignore tests failing for later tickets
* fixup! CLDC-4151: Add new referrals questions
start q nums from 2026
* CLDC-4151: Add model tests for new questions
* fixup! CLDC-4151: Add new fields to bulk upload
export old_visible_id
set MAX_COLUMNS correctly
check .prp? for prp cols
* fixup! CLDC-4151: Update tests
clarify tests that may update
* fixup! CLDC-4151: Add new fields to bulk upload
handle the old_visible_id not existing
use override org ID only for the output owning ID. it's only passed as eg ORG1
* CLDC-4151: Add new questions to log factory
* fixup! CLDC-4151: Add new fields to bulk upload
leave field_131 validations till later
* CLDC-4188: Add LA flow
splits the referral_register question and pages into two, as its not easy to have the answers be dependent
if the owning organisation changes type, reset the referral register question. the other questions do not need to be reset as they are no longer routed to
* CLDC-4188: Infer referral_register for renewals
needs a new dependencies array for 2026
this handles inferring as well as clearing inferred answers if the prior answer changes
* CLDC-4188: Add validation between prevten and referral_register
block two other validations from previous years
* CLDC-4188: Update tests
* CLDC-4188: Ignore tests failing for future tickets
* CLDC-4188: Update existing tests
needed as should_reset_referral_register? calls a .find()
* fixup! CLDC-4188: Add validation between prevten and referral_register
use .prp?
improve grammar
* fixup! CLDC-4188: Infer referral_register for renewals
extract dependencies to common list
* fixup! CLDC-4188: Update tests
use before and context blocks better
* fixup! CLDC-4188: Update tests
lint
* fixup! CLDC-4188: Update tests
remove unneeded referral_type set
* CLDC-4189: Add PRP flow
* CLDC-4189: Update validation between prevten and referral_register
* CLDC-4189: Add tests
* fixup! CLDC-4189: Add PRP flow
fix typo
Co-authored-by: Oscar Richardson <116292912+oscar-richardson-softwire@users.noreply.github.com>
* fixup! CLDC-4189: Add tests
fix typo
* fixup! CLDC-4189: Add tests
fix missing cases in page specs
use a loop and before blocks for household validation tests
* CLDC-4189: Ensure log is not classed as generan needs if prevten isnt answered
* fixup! CLDC-4189: Add tests
add cases for other internal transfer flow
* CLDC-4190: Invalidate all referral fields if any are wrong
* CLDC-4190: Remove other validations on referral fields
* CLDC-4190: Ignore referral validation if BU is renewal
* CLDC-4190: Add tests
* fixup! CLDC-4190: Invalidate all referral fields if any are wrong
add punctuation to comment
name validation fields better
* fixup! CLDC-4190: Add tests
make test names clearer
* CLDC-4190: Final field fixes
---------
Co-authored-by: Oscar Richardson <116292912+oscar-richardson-softwire@users.noreply.github.com>
* CLDC-4191: Q84 Referral CSV and XML export (#3157)
* CLDC-4151: Note deprecations of existing referral questions
* CLDC-4151: Add new cols to lettings log model
* CLDC-4151: Add new referrals questions
* CLDC-4151: Remove referral value check
* CLDC-4151: Add new fields to bulk upload
use new fields as presented in bulk upload
* CLDC-4151: Update tests
also add bulk upload file to test with
* CLDC-4151: Ignore tests failing for later tickets
* fixup! CLDC-4151: Add new referrals questions
start q nums from 2026
* CLDC-4151: Add model tests for new questions
* fixup! CLDC-4151: Add new fields to bulk upload
export old_visible_id
set MAX_COLUMNS correctly
check .prp? for prp cols
* fixup! CLDC-4151: Update tests
clarify tests that may update
* fixup! CLDC-4151: Add new fields to bulk upload
handle the old_visible_id not existing
use override org ID only for the output owning ID. it's only passed as eg ORG1
* CLDC-4151: Add new questions to log factory
* fixup! CLDC-4151: Add new fields to bulk upload
leave field_131 validations till later
* CLDC-4188: Add LA flow
splits the referral_register question and pages into two, as its not easy to have the answers be dependent
if the owning organisation changes type, reset the referral register question. the other questions do not need to be reset as they are no longer routed to
* CLDC-4188: Infer referral_register for renewals
needs a new dependencies array for 2026
this handles inferring as well as clearing inferred answers if the prior answer changes
* CLDC-4188: Add validation between prevten and referral_register
block two other validations from previous years
* CLDC-4188: Update tests
* CLDC-4188: Ignore tests failing for future tickets
* CLDC-4188: Update existing tests
needed as should_reset_referral_register? calls a .find()
* fixup! CLDC-4188: Add validation between prevten and referral_register
use .prp?
improve grammar
* fixup! CLDC-4188: Infer referral_register for renewals
extract dependencies to common list
* fixup! CLDC-4188: Update tests
use before and context blocks better
* fixup! CLDC-4188: Update tests
lint
* fixup! CLDC-4188: Update tests
remove unneeded referral_type set
* CLDC-4189: Add PRP flow
* CLDC-4189: Update validation between prevten and referral_register
* CLDC-4189: Add tests
* fixup! CLDC-4189: Add PRP flow
fix typo
Co-authored-by: Oscar Richardson <116292912+oscar-richardson-softwire@users.noreply.github.com>
* fixup! CLDC-4189: Add tests
fix typo
* fixup! CLDC-4189: Add tests
fix missing cases in page specs
use a loop and before blocks for household validation tests
* CLDC-4189: Ensure log is not classed as generan needs if prevten isnt answered
* fixup! CLDC-4189: Add tests
add cases for other internal transfer flow
* CLDC-4190: Invalidate all referral fields if any are wrong
* CLDC-4190: Remove other validations on referral fields
* CLDC-4190: Ignore referral validation if BU is renewal
* CLDC-4190: Add tests
* fixup! CLDC-4190: Invalidate all referral fields if any are wrong
add punctuation to comment
name validation fields better
* fixup! CLDC-4190: Add tests
make test names clearer
* CLDC-4191: Update CSV export tests
the export happens by default, no changes needed here
* CLDC-4191: Add new referral fields to 2026 exports
remove old referral fields from 2026 exports
ensure new referral fields don't show in pre 2026 exports
* CLDC-4190: Final field fixes
---------
Co-authored-by: Oscar Richardson <116292912+oscar-richardson-softwire@users.noreply.github.com>
---------
Co-authored-by: Oscar Richardson <116292912+oscar-richardson-softwire@users.noreply.github.com>
* CLDC-4141: use prefers not to say text in cya page
* CLDC-4141: update csv service to actually use new labels
* CLDC-4141: reformat complex condition for readability
* CLDC-4141: update csv export tests
* CLDC-4141: revert changes to csv service
* CLDC-4141: use label_from_value to override CYA values
* CLDC-4141: update question tests
* CLDC-4141: update expected exports
* CLDC-4141: update export spec
* CLDC-1980: copy setup from CLDC-4200
* CLDC-1980: add All buyers labels
* CLDC-1980: add All buyers labels to soft validations for 2026 onwards
* CLDC-1980: update tests
* CLDC-1980: update base q tests
* CLDC-1980: reduce number of questions changed to first per section
* CLDC-1980: undo redundant test changes
* CLDC-1980: add new required args to page specs
* CLDC-1980: add new required args to page specs
* CLDC-4142: Add new cols to database
* CLDC-4142: Add questions to flow
optimise household_characteristics as there's a lot of repeated code. should make the sections a bit easier to manage
* CLDC-4142: Add conditional description question
seems to largely just work without needing major tweaks
* CLDC-4142: Ensure description if nil if not shown
looks like there's no automated process for this. without this the description will be "" if not given
* CLDC-4142: Add new question to log factory
* CLDC-4142: Add new fields to BU parser
update BU template file to match
* CLDC-4142: Add new fields to BU file generator
* CLDC-4142: Add new fields to xml export
also improve xml export matcher to report differences
* CLDC-4142: Add final question numbers
* CLDC-4142: Add question specs
* CLDC-4142: Add a PERSON_DETAILS override for gender_same_as_sex
this ensures if details aren't known the field will be redacted
* CLDC-4142: Update model tests
* CLDC-4142: Update CSV export service tests
* CLDC-4142: Update other tests
* fixup! CLDC-4142: Update CSV export service tests
update sales variable definitons too
* fixup! CLDC-4142: Ensure description if nil if not shown
update inferral method name and comment
* CLDC-4142: Update CYA copy as requested
cya for gender_same_as_sex 'no' instead of 'no, enter gender description'
cya for gender_description has the label 'gender identity description'
* CLDC-4142: Use label_from_value for custom CYA text
this replaces @inferred_check_answers_value so it'll work in CSV export too
* CLDC-4154: Add a dropdown for needs type guidance
* CLDC-4154: Update tests
* fixup! CLDC-4154: Add a dropdown for needs type guidance
improve syntax on optional partial
improve copy for needs type dropdown
* fixup! CLDC-4154: Update tests
make needs type page spec for current times
* CLDC-4154: Update needs type dropdown title
as requested by CORE
* CLDC-4200: Add mechanism for custom CYA header labels
also simplify the view logic for check answers summary list
* CLDC-4200: Add custom CYA header for household members
* CLDC-4200: Add tests
* CLDC-4177: Create new sex-at-birth question
* CLDC-4177: Update database
* CLDC-4177: Adds SAB form for the primary buyer.
* CLDC-4177: Adds sex-at-birth question for other household members
* CLCD-4177: Unit tests
* CLDC-4177: Misc inclusions where sex is also used
* CLDC-4177: Lint fixes
* CLDC-4177: Do not include sexRAB in pre-2026 exports
* CLDC-4177: Fixes bug with copy key in new page
* CLDC-4177: Changes logic used to decide which fields to export
* CLDC-4177: Linting fixes
* CLDC-4177: Converts new field to lowercase
* CLDC-4177: Satisfy bulk upload tests (not tested manually)
* CLDC-4177: Rename new fields to lowercase
* CLDC-4177: Rename field in bulk upload.
* Fix db casing
* CLDC-4177: remove frozen string literals
* Delete redundant migration
* Remove extraneous lines from schema.rb
* Add new sexrab fields to the :completed trait in the Sales Log factory
* CLDC-4177: remove redundant inferred CYA vals
* CLDC-4177: update bu files
* CLDC-4177: update sales log export service
* CLDC-4177: update schema
* CLDC-4177: linting
* CLDC-4177: update sales log export constants
* CLDC-4177: update factories
* CLDC-4177: lint
* CLDC-4177: csv parser updates
* CLDC-4177: bu field updates
* CLDC-4177: update var def spec
* CLDC-4177: make to_2026_row explicit
* CLDC-4177: use shared field count
* CLDC-4177: refactor to remove max cols going forwards
* CLDC-4141: update schema
* CLDC-4141: update schema
* CLDC-4141: update schema
* CLDC-4141: remove X from factory options
* CLDC-4177: update log var defs
* CLDC-4177: use correct shared field count
* CLDC-4177: remove trailing commas
* CLDC-4177: update bulk upload csv example
* CLDC-4177: update bulk upload csv example
* CLDC-4177: remove sexrab from expected sales export for now
---------
Co-authored-by: oscar-richardson-softwire <oscar.richardson@softwire.com>
Co-authored-by: Nat Dean-Lewis <nat.dean-lewis@softwire.com>
* CLDC-4149: Add new prevten option general needs
* CLDC-4149: Update tests
* fixup! CLDC-4149: Add new prevten option general needs
improve constant name
* fixup! CLDC-4149: Add new prevten option general needs
specify start year where its guaranteed
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-4105: Add working situation illness check to log fields
* CLDC-4105: Add soft validation to main flow
* CLDC-4105: Add tests
soft validations
models
add a label file for this year so the export_codes tests have authentic labels to pull
the old BU completed log answers throw the new soft validation. needed to change illness to 3 to avoid the soft validation as it should be a complete log
* fixup! CLDC-4105: Add working situation illness check to log fields
* fixup! CLDC-4105: Add soft validation to main flow
remove unneeded coalesce
remove unneeded variable
* fixup! CLDC-4105: Add tests
fix after rebase
* fixup! CLDC-4105: Add soft validation to main flow
account for if hhmemb is not answered
* CLDC-NONE: Add a test to ensure future logs are completed
* fixup! CLDC-NONE: Add a test to ensure future logs are completed
fix assertion order
improve test labels
* Ask address and UPRN questions for 2026 and later logs
* Fix page tests
* Fix LA and postcode overrides
* Fix resetting address fields and LA
* Add tests for resetting address fields and LA
* Fix lettings log derived fields tests
* Fix lint
* Fix tests
* Clean up lettings log property overrides
* Add comments
* Fix lint
* Add error to location field
* Add error to location field
* Add tests for error on location field
* Refactor property and location postcode matching validation into own function
* Add test for LA override
* Add test for postcode override
* Added `!record.read_attribute(:la)` guard
* Fix lint
* Fix property validation for checking LA is active/in England
* Fix test
* Minor tweaks
* Fix lint
* CLDC-4115: Fix flaky collection_time_helper test
if the max date was returned test would fail
use date objects instead
* CLDC-4115: Ensure page is loaded before running accessibility tests
unclear whether this will make a difference, will push now and run the pipeline a couple times
* CLDC-4115: Search for post merge scheme by name
rather than relying on it being first
* Revert "CLDC-4115: Ensure page is loaded before running accessibility tests"
This reverts commit ff1ef0a466a1ca4f70e44f6d584c666c975184e1.
doesnt seem to work
* CLDC-4115: Ensure question uses default label logic
* CLDC-4115: Ensure form is loaded correctly before testing filters
* CLDC-4115: Ensure form is loaded correctly before testing locations
* CLDC-4115: Force page_load timeout to 10 seconds
* fixup! CLDC-4115: Search for post merge scheme by name
* fixup! CLDC-4115: Ensure form is loaded correctly before testing filters
remove 23/24 tests
make tests no longer year specific
* CLDC-4115: Remove order of csv requirement from count duplicates rake test
* CLDC-4145: Derive is partner for under 16s
in contrast, clear is partner if the age goes >=16 so the user must answer the question again
* CLDC-4145: Remove under 16 soft validation for 2026
it will no longer be shown as we infer the answer
* fixup! CLDC-4145: Derive is partner for under 16s
* fixup! CLDC-4145: Remove under 16 soft validation for 2026
the check is added twice before two diff questions
* CLDC-4145: Update tests
* fixup! CLDC-4145: Derive is partner for under 16s
lint
* fixup! CLDC-4145: Update tests
lint
* fixup! CLDC-4145: Derive is partner for under 16s
check if the was was null rather than current. avoids potential bugs on first assign
* fixup! CLDC-4145: Update tests
some more tests added / updated
* fixup! CLDC-4145: Update tests
turns out editing the future form use is not possible for tests, too many depend on it failing
use timecop instead
* fixup! CLDC-4145: Update tests
fix lettings log export
* fixup! CLDC-4145: Update tests
add 2024 derived variable tests
* fixup! CLDC-4145: Update tests
lint
* CLDC-4145: Add a depends_on to ensure partner is hidden
* fixup! CLDC-4145: Add a depends_on to ensure partner is hidden
remove unnecessary depends_on
make test ranges clearer
* CLDC-4136: Hide question on UI flow
* CLDC-4136: Hide question from log download csv
* CLDC-4136: Remove question from BU parser
relabel all following fields
* Revert "fixup! CLDC-4136: Remove question from BU parser"
This reverts commit cda3ec1099.
* Revert "CLDC-4136: Remove question from BU parser"
This reverts commit e4715ee976.
* fixup! CLDC-4136: Hide question on UI flow
remove from question list instead
* fixup! CLDC-4136: Hide question from CDS export
use correct year in dates
* fixup! fixup! CLDC-4136: Hide question from CDS export
use correct year in all dates
* Reorder questions
* Revert "Reorder questions"
This reverts commit ffbd4d94dc.
* Reorder questions for 2026 onwards only
* Fix tests after rebase
# Conflicts:
# spec/fixtures/files/lettings_log_csv_export_codes_26.csv
# spec/fixtures/files/lettings_log_csv_export_labels_26.csv
# spec/fixtures/files/lettings_log_csv_export_non_support_codes_26.csv
# spec/fixtures/files/lettings_log_csv_export_non_support_labels_26.csv
* Fix model tests
* Lint
* Correct test descriptions
* Fix after rebase
---------
Co-authored-by: Samuel Young <samuel.young@softwire.com>
* CLDC-4162: Add parsers for 2026
* CLDC-4162: Integrate 2026 parsers into codebase
* CLDC-4162: Add tests
* CLDC-4162: Update tests for existing years
remove year dependencies where possible
* CLDC-4162: Add example 2026 bulk upload files
* CLDC-4162: Update BU test file generate buttons
* fixup! CLDC-4162: Update BU test file generate buttons
we only need the 14 days validation when the future forms feature toggle is off, otherwise any date can be input
* fixup! CLDC-4162: Integrate 2026 parsers into codebase
improve TODOs
* fixup! CLDC-4162: Add parsers for 2026
add todos for unknown info
* fixup! CLDC-4162: Update tests for existing years
properly mark year specific tests
* fixup! CLDC-4162: Update tests for existing years
use 25 over 2025
* CLDC-4136: Hide question on UI flow
* CLDC-4136: Hide question from CDS export
* CLDC-4136: Hide question from log download csv
* CLDC-4136: Remove question from BU parser
relabel all following fields
* fixup! CLDC-4136: Hide question from CDS export
* fixup! CLDC-4136: Remove question from BU parser
* Revert "fixup! CLDC-4136: Remove question from BU parser"
This reverts commit cda3ec1099.
* Revert "CLDC-4136: Remove question from BU parser"
This reverts commit e4715ee976.
* fixup! Revert "CLDC-4136: Remove question from BU parser"
* fixup! CLDC-4136: Hide question on UI flow
remove from question list instead
* fixup! CLDC-4136: Hide question from CDS export
use correct year in dates
* fixup! fixup! CLDC-4136: Hide question from CDS export
use correct year in all dates
* fixup! CLDC-4136: Hide question on UI flow
update tests to account
* fixup! CLDC-4136: Hide question on UI flow
lint test
* CLDC-4162: Add parsers for 2026
* CLDC-4162: Integrate 2026 parsers into codebase
* CLDC-4162: Add tests
* CLDC-4162: Update tests for existing years
remove year dependencies where possible
* CLDC-4162: Add example 2026 bulk upload files
* CLDC-4162: Update BU test file generate buttons
* fixup! CLDC-4162: Update BU test file generate buttons
we only need the 14 days validation when the future forms feature toggle is off, otherwise any date can be input
* fixup! CLDC-4162: Integrate 2026 parsers into codebase
improve TODOs
* fixup! CLDC-4162: Add parsers for 2026
add todos for unknown info
* fixup! CLDC-4162: Update tests for existing years
properly mark year specific tests
* fixup! CLDC-4162: Update tests for existing years
use 25 over 2025
* fixup! CLDC-4162 Update BU test file generate buttons
---------
Co-authored-by: carolynbarker <8038496+carolynbarker@users.noreply.github.com>
* CLDC-4158: Re-enable future form use on pre-prod
* CLDC-4158: Create new locales for 26/27
* CLDC-4158: Add deadlines for 26/27 forms
* CLDC-4158: Add 2026 helper to forms