* 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
* Bump faraday version
* CLDC-NONE: add an initializer include for openstruct
seems some environments were having trouble loading it
---------
Co-authored-by: Samuel Young <samuel.young@softwire.com>
* 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-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
* 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-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-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
* CLDC-4095: Ensure errors are added to Q89 dependent fields
this ensures that the user is always shown an error if they complete the form in a different order to the question set
not doing this leads to the user submitting an answer and nothing happening
* CLDC-4095: Update existing tests to check these new fields
* CLDC-4090: Add validation that the LA is still active for the date of the log
* CLDC-4090: Add verifying tests
* CLDC-4090: Ensure startdate is not nil for this validation
* CLDC-4090: Document linked validations
* CLDC-4090: Remove errors on uprn_confirmation question
this question is no longer asked, so there are no errors needed for it
left the existing translations
* CLDC-4090: Update tests
* CLDC-4046: Remove forcing on Q84 based on Q76 answer
* CLDC-4046: Removing forcing on latter half of Q84 as well
* CLDC-4046: Remove orphaned translations
* CLDC-4086: Fix tests
* Add questions to page, wip
* Add select as conditional question in radio like in logs
* Add existing value
* Add blank default
* Add values to about this organisation page
* Move grabbing values out of view
* Update new org page with js
* Selecting the profit status dependent on the provider type
* Add to org edit page for support users
* Add group logic
* Fix bug on existing orgs when group remains unchanged
* Clear group details if no longer part of a group
* Lint
* JS Lint
* Restore schema
* Remove manual_address_selected
* Revert "Remove manual_address_selected"
This reverts commit 812787fd09.
* Revert "Revert "Remove manual_address_selected""
This reverts commit 8ebd56036f.
* Update migration
* Remove file
* Move update after save
* Move methods to controller
* Update xml export
* Lint
* Update test xml file
* Update current user logic
* Lint
* Lint
* Reorder org js controller
* Lint
* Add tests to helper
* Some tests on the organisation pages
* Fix label text for profit status question in forms
* Add CSV task to update organisation profit status and group member fields
* only associate group on update if validation passes
* Update import raketask to use provided csv
looking into it I couldn't see a use for skip_group_member_validation. it temporarily disables validation but since it's not saved to database it'll make the organisation invalid in the future
opted instead to make all properties valid when importing
* Update tests to check more cases of organisation import
* Make XML tests check unordered file contents
stops tests flakily failing on the order of cols which is not important in xml
* Fix final failing tests
* restore manual_address_selected migration
* fix it's to its
* show the user the group they originally selected if possible when editing group
else fallback to any (oldest) org in the group
* update csv for ingest
---------
Co-authored-by: Manny Dinssa <44172848+Dinssa@users.noreply.github.com>
* Add validation message for missing charge fields in bulk upload
* Update error messages for missing charges in row parser tests
* only annotate errors to the other fields if there was an error
---------
Co-authored-by: Samuel <samuel.young@softwire.com>
* Separate change organisations name from organisation edit view
* Remove change_name action from organisations_controller for unauthorized access handling
* Add migration for organisation name changes
* Implement organisation name change feature with history tracking
* Update organisation label methods to accept date parameter for accurate historical representation
* Rename change_name view to new and move it for clarity and consistency
* Refactor organisation name change logic to ensure visibility and uniqueness of change dates
* Refactor organisation name changes to use integer for change_type and date for change_date
* Update validation error message for duplicate change dates in organisation name changes
* Update validation logic for change dates to handle immediate changes
* Rename change_date to startdate in organisation name changes and update related logic
* Make change_type nullable in organisation name changes table
* Remove debug logging for organisation name change parameters
* Update conditional question data-info to use startdate instead of scheduled_date
* Bug fix - ensure startdate is set only if not already defined for immediate changes
* Fix immediate_change parameter type casting in organisation name change params
* Refactor name_changes_with_dates method to streamline fetching and status assignment
* Enhance layout in new.html.erb by adding additional grid columns for improved structure
* Update status assignment logic in organisation.rb to reflect active state when no changes exist
* Add validation to ensure start date is before organisation's merge date if present
* Drop organisation_name_changes table if it exists
* Remove organisation_name_changes table from schema
* Add organisation_name_changes table
* Lint fixes
* Lint fixes
* Add FactoryBot definition for organisation_name_change
* Add tests for organisation name changes
* Enhance validations and add tests for organisation name changes
* Lint
* Add tests for OrganisationNameChangesController actions
* Add comments in OrganisationNameChange
* Refactor organisation name change validations to use I18n for error messages
* Fix name method to allow nil date parameter and default to current time
* Update organisation name retrieval to support date parameter in exports
* Remove change_type attribute from organisation name changes
* Lint fix
* Update organisation status logic to account for future start dates of the first change
* Refactor name history display into a partial for better code organization
* Add cancel functionality for scheduled name changes with confirmation page
* lint
* lint
* Add validation for referral type when permanently decanted from PRP-only housing
* Remove unnecessary error adding, PRP and different landlord is possible
* Update tests
* Update text copy to use curly apostrophes for consistency
* Update BU text copy to use curly apostrophes for consistency
* Update BU text copy to use curly apostrophes for consistency
* Update text copy to use 'Other' for consistency in instead of 'other'
* Update text copy for 'Reasonable preference reason' fields to improve clarity
* Update tests
* Adjust staircase difference validation to exclude initial purchase
* Update tests
* Keep validation as is, add error to firststair also
* Add method to generate random dates within collection year for logs
* Revert "Update tests"
This reverts commit e708187160.
* Update financial validations tests to reflect new error messages for firststair
* Update sales log test only pick a date up to 14 days away
* Lint
* Adjust merge date for future dates
* Update La test
* Fix date range logic in generate_different_date_within_collection_year method
* Refactor generate_different_date_within_collection_year to use keyword arguments for start and end date overrides in tests
* Refactor sales_log_spec to use descriptive variable names for date overrides
* Refactor merge_requests_helper_spec to use generated merge dates for consistency in tests
* Refactor generate_different_date_within_collection_year
* Refactor sales_log_spec to use generated sale date for duplicate log creation
* Refactor sales_log_spec to use fixed date values for end date and date after end date, mimics change of year without changing year
* Refactor merge_requests_helper_spec to use a fixed merge date for consistency in tests
* Refactor generate_different_date_within_collection_year to handle edge cases and return nil if no available dates
* use separate question text for shared and discounted mscharge from 2025
* refactor and rename copy variables
* Revert "refactor and rename copy variables"
This reverts commit 2d7eadef5a.
* separate out shared ownership leasehold charge into separate service charge question
* Revert "separate out shared ownership leasehold charge into separate service charge question"
This reverts commit 13a930dcb6.
* separate out shared ownership leasehold charge into separate question but same variable
---------
Co-authored-by: Carolyn <carolyn.barker@softwire.com>
* validate staircasing dates
* validate staircasing percentage totals
* don't show both similar validations at once
* only validate against saledate when saledate present
* format numbers in error message
* add tests for staircasing validations
* linting
* don't block log creation on staircasing date errors
* combine similar validation methods
* update tests
* fix syntax
---------
Co-authored-by: Carolyn <carolyn.barker@softwire.com>