* some minor refactoring
remove methods from child class that replicate methods on the parent class
tidy up check for nil
remove gubbins and inline method body given only used once
* update import services for lettings and sales to import creation method
write tests to cover this
* create sales log field import service and associated spec file, with methods and tests for importing the creation method of logs that have already been imported
* update lettings log field import service and related spec to allow importing creation method of logs
* use the methods dynamically created by active record in all relevant places, removing obsolete methods in teh process.
various tests tweaked to suppor this change.
rake task from another ticket folded into this ticket to prevent merge conflicts
* rename method for ruby conventions
* update PR for altered spec
upload id now decided to be a better indicator of bulk upload status, import service amended accordingly
tests updated in line with this
* update field import services in line with import services to use upload id rather than upload method as the source of truth for how a log was created
* slight refactor to reduce nesting and dodge linter complaints
* minor amendment to log creator spec in bulk upload to use enum dynamic methods
- Previously, when attempting to import a log that already exists in the service, the importers would update its attributes.
- In most situations we don't want this as it could override changes that the user has made to the logs.
- This change adds an option to the log import services to allow this functionality to be toggled.
* Clear invalid format previous postcode
* Fix import with income 2 outside of london validation
* Remove mscharge if it is under minimum
* Clear frombeds if it's out of range
* Clear all the charges if the error is on tcharge
* Round earnings value upon import
* Rounds savings to the nearest 10
* Clear income on over_hard_max_for_london validation
* Refactor sale import validations to be consistent with lettings
* Extract charges attributes into a variable
* Remove failing equity over max on import
* Remove failing equity under min on import
* Use LA instead of postcode if postcode is in invalid format
* Do not backfill information about people indexed 7 and higher
* Unskip test
* Set default hhregresstill
* Don't clear type if it errors
* Make mortgagelender mandatory and add a don't know option
* Infer mortgagelender as don't know by default
* Add discounted_sale_value_check to sales
* Add DiscountedSaleValueCheck pages and questions
* Add value check to the form
* Only run validate_discounted_ownership_value as a hard validation on and after 24/25
* Rebase fix
* Fix form spec
* Update discounted_ownership_value_invalid?
* update validation
* Update soft validation content
* PR comments
* typo
* lint
* Default discounted_sale_value_check on import
* Make mortlen optional for 22/23
* Set extrabor to don't know it is not answered
* Make mortgage lender and othtype optional
* Add hidden don't know options to soctenant and fromprop
* Make frombeds optional
* Display soctenant questions if soctenant is don't know
* infer soctenant values if not given
* Do not run discounted ownership validation if mortgageused is don't know
* Clear previuos postcode if import hits postcodes_not_matching error
* Remove child income validation for 22/23
* Remove invalid exchange date
* Clear income 1 if it's over allowed non london threshold
* remove question no longer needed and associated test file
* amend page and the other question in that page that determined whether the deleted question should be shown
update associated test files
* createa a migration to remove the column for the deleted question
* update test broken by changes
* fix test broken by changes
* import LA if it cannot be inferred
* Assume mortgage is used if information about it is given
* Only import 22/23 logs
* remove comment
* Include the first day of collection window
* Only process sales logs in sales import job
* Only process lettings logs in lettings import job
* Add sales log import task to the full import
* change review app import bucket name
* Update mortgageused and joinmore
* Update jointmore and ownership scheme
* Fix ownershipsch so that it doesn't override to nil
* Set default relat2, update default household count
* het ownership from type if not given
* Improve logging
* Remove mortgageused method
* Look at Q16aProplensec2 column if Q16aProplen2 is empty
* Set default income used and pregblank
* Remove fields calculated internally
* Comment out sales import from full import task
* typo and change bucket name
- We discovered earlier today (thanks Kat) that we have accidentally missed out ‘what are the monthly leasehold charges?’ in the ‘outright sales’ section of the 22/23 sales form on old CORE – the very last question on the form.
- We've decided that we will not add the question back in for 22/23. However we will add it back in for the upcoming 23/24 forms.
* Create test fixtures
* Add old id column
* Add sales logs importer
* Save and update completed discounted ownership log without postcode
* Update fixtures to be incomplete
* Import a completed shared ownership example
* Test with a non homebuy shared ownership example
* Add privacynotice
* Update hholdcount and confirmed fields
* Add buyer stilll serving mapping
* Add totadult/totchild and outright sale examples
* Update log fixtures
* Extract shared methods into logs import service and lint
* Add sales logs import rake task
* Update noint, xml examples and some mappings
* Add tests for checking that all required questions are answered
* Update tests, clean up import
* Map mortgage lender and mortgage lender other
* Infer Mscharge known as no for outright sale
* refactor setting default values
* when the armedforcesspouse is not answered set is as don't know
* Refactor tests: change log id names
* set savings to not known if not given
* Refactor tests: change nesting
* Backfill default household characteristics for completed log
* Add more default mapping
* Typo
* Improve logging and refactor tests
* Adjust test data to fit with the mappings that are known so far
* Rename fixture files