* Adjust xml export to export refused details, update refused to take into account details_unknown
* Recalculate refused values for lettings logs with unknown person details
* Export refused values in the csv
* Update file names
* feat: move ordering after filtering to avoid ORDER BY using expressions not in SELECT DISTINCT list
* feat: add multiple schemes so tests will fail if this bug appears again
* create helper module to find all logs for a given user that have duplicates
write associated tests
update methods on user model to retrieve logs related to a given user
create a scope on logs to retrieve logs created by a given user
* check for duplicates and display notification banner on the index page where appropriate
tests to cover the desired behaviour
* alter duplicate logs helper to return duplicates in a format that can be passed through the params
update associated tests
* create user journey to view duplicate sets adn navigate to a given set
create a new route and add it to the link from the logs index page
create controller method and related view file
* update path for duplicate logs in routes, update factories, refactor duplicates scope to eliminate raw sql
* write tests for the duplicate logs index page
* correct linting errors
* minor amendments from code review.
* temp
* Refactor
* Create a scope for duplicate groups
* fixes
* lint
* Update controller specs
* Put duplicate sets count behind a feature flag
* refactor index
* Update duplicate_sets_count
* Update scopes
* tests
* pass in original log id
* tests
* Add duplicate index page content
---------
Co-authored-by: Kat <katrina@kosiak.co.uk>
* Add availability to the merged org options
* Do not delete merged organisation relationships
* displays managing agents of merged organisation selected as owning org
* Add absorbing org dates, fix copy
* set managing org as owning org it is being absorbed by the users org
* Update check answers to use the correct logs
* Display different link when correcting duplicates
* allow deduplicating logs by changing the answers
* Route back to the initial log if it still has duplicates
* Update back to log button
* Add banner
* Update success banner
* Fix a flaky test
* Rename param and update conditionals
* Add owning organisation to deduplication fields, only return back to the original log if it still belongs to the org
* Display absorbed orgs/absorbed org stock owners
* Only display orgs merged during open collection period
* split guard clauses back
* Do not show stock owners in sales logs owning org options
* Update routed to method
* Display active dates for support
* Add start date validations for merging orgs
* Add errors for merged orgs
* tests
* don't run validations unless the date exists
* Adjust the dates in validations
* feat: wip update sales org select
* feat: update routing and hidden in check answers methods
* feat: set sales org id as derived
* feat: update tests
* refactor: linting
* feat: update tests and radio options
* feat: update test
* feat: add value helper test for non-constant value question
* refactor: lint
* feat: freeze time in unrelated test
* refactor: linting
* Add location filters to the controller
* Display the status filter and clear filters
* refactor status filter into scope
* Update incomplete, make reactivated scope work in conjunction with other scopes. Lint
* specs
* styling
* Update test name
* uncomment a test
* Move filters under navigation
* Filter schemes
* Add status filter to schemes pages
* Filter schemes deactivating in more than 6 monts as active
* Always serialize session filters for schemes
* Remove ordering in search, fix tests
* Update incomplete scope
* feat: add absorbing_organisation relationship to orgs
* feat: wip absorbed orgs visibility work
* feat: add absorbed orgs to filter options, make unique
* refactor: simplify
* feat: add test
* feat: update schema
* feat: add absorbed org to user relations
* feat: be more explicit about org scopes
* feat: update log org question selections
* feat: add org question to sales for all users (to be specified again in later ticket)
* feat: revert previous and handle in separate ticket
* feat: update validation and tests
* feat: reload org to populate associations
* feat: check for holding own stock in stock owner question, add schema
* feat: add/update org filter tests
* feat: update test
* feat: update created by id pages
* Add user status filters
* Add filters to the pages
* only show unconfirmed and deactivated logs as deactivated
* Look at last signed in at to determine unconfirmed users
* feat: wip commit
* feat: rest of assigned to filter behaviour
* feat: start to update tests
* feat: update tests
* feat: update tests
* refactor: linting
* feat: add new test
* feat: add new test
* feat: update filters_count
* feat: let support users see all users
* feat: let users select users from stock owners/managing agents too
* refactor: typo
* feat: update tests
* Remove new_data_protection_confirmation? flag
* Update schema
- drop index
- add org and user data to dpc table
* Persist org and user data at import
* Do not show invalid emails
* Persist user and org data while signing agreement
* Add migration to persist org and user data on DPC
* Rebase fix
* fix typo
* CLDC-2494: WIP
* CLDC-2494: wip
* CLDC-2494: page work in progress
* cleanup
* Add a path for duplicate logs
* Display all duplicate logs
* Move a test
* Display duplicate check answers for logs
* Add buttons to delete duplicates
* Add a route for sales logs duplicates
* Update duplicated page to work for sales logs
* Update styling
* lint
* Add auth
* Rebase updates
* Remove propcode from dedulication checks
* Update fields to work with supported housing
* Trigger duplicate log check on buyer 1 age not known
* compare correct charges
* Update displayed questions
* BU test
* Put redirect to duplicate logs path behind a feature flag
* More BU tests
---------
Co-authored-by: Kat <katrina@kosiak.co.uk>
* form handler to return all questions from lettings forms for all years with ordering interleaved
functionality and tests
* refactor lettings log csv service and all associated tests
remove methods on log models when we can call them directly on associated models
update job to call the service directly with the collection of logs rather
minor modifications to the sales log csv service
update many test files to test the appropriate logic in the appropriate place
* tidying
final amendments to tests
remove commented code
rename variable
* change the position of the rent value check field in the headers
* CLDC-2492 add creation method field to logs (#1738)
* create migrations to add creation method fields to both log types
* add enum definition to logs for creation method
* upadte csv export services to retrieve creation method values direct from the log, remove methods previously used from the log model
* run migrations to update schema
* ensure that logs created via bulk upload have this set correctly when created
* Renme end_date to new_logs_end_date
* Display change buttons in CYA if the collection is still open for editing
* Allow navigating to question if the collection is still open for editing
* Allow logs to be edited if the date is before edit end date
* Update sales validation to allow editing existing logs
* update tests
* Update edit_end_date
* Update some test wording
* Update new logs end date
* tests
* CLDC-2439: min and max rent value check questions created
* CLDC-2439: Informative removed, check pages fixed.
* CLDC-2439: removed informative info tests and rent value check
* CLDC-2439: fixed informative missing test failure
* CLDC-2439: Text moved to en.yml
* CLDC-2439: tests added, copy moved to en.yml
* CLDC-2439: tests added, copy moved to en.yml
* CLDC-2439: content change for bulk upload errors WIP
* CLDC-2439: informative rendering change, content change, test updated
* CLDC-2439: failing test fix.
* CLDC-2439: display_informative_text test added for strings
* CLDC-2439: string as var in test
* feat: add org id to about page and update tests
* refactor: tidying
* feat: just enforce names are strings adn remove humanization to display ID in caps as required
* refactor: lint
* feat: fix tests
* CLDC-2075: details added to three question pages with tests updated
* CLDC-2075: guidance partial displaying depends on specific year
* CLDC-2075: Page and questions tests for each for all 3 questions
* CLDC-2075: Header content change on all 3 question pages
* CLDC-2075: linting fix
* CLDC-2075: fix failing subsection test
* CLDC-2075: date clarification in tests
* CLDC-2075: Linting
* CLDC-1507: rent explanation added to rent type question page.
* CLDC-1507: 'Rent Type' headed added above question
* CLDC-1507: test amended to include new header.
* CLDC-1507: guidance partial test added
* CLDC-1507: LSEP unicode character removed from definition
* Add mailer
* Instantiate logs only where needed
* Update banner to handle all possible permutations
* wip
* Send confirmation email to user
* Address PO review