* CLDC-4028: Ensure logs will update when an organisation name change is created, as they draw the org name
this could lead to redundant exports if the name change does not impact the log at its startdate (which we put into the log), but it'd be more difficult to query this way so fine to be safe here
also query name changes by updated_at. shouldn't really matter as we don't expect name changes to be updated but worth being safe in case we need to update a name change for maintenance reasons
* CLDC-4028: Fix created at name change in lettings log
always safer to use updated at for checking whether the record has changed
* CLDC-4094: Use IDs to reassociate logs after a merge
using names was unsafe as these are not guaranteed unique in an organisation or scheme
build a list of old to new log IDs as merging schemes and locations, then use this when merging lettings logs
* CLDC-4094: Add a verifying test
* CLDC-4044: Reset last_sign_at fields on reactivation
this is to ensure that the code considers them a fresh user
specifically, ensures that the "Resend invite link" button will show
* CLDC-4044: Allow sending activation emails for unconfirmed users that have logged in
looks like CORE treats this state functionally for reconfirmed users & has a unique email sent out
so instead, change code to account for this and allow for sending emails to unconfirmed but signed in users
* CLDC-4044: Add verifying test
* CLDC-4044: Add clarifying comment
specifically, during bulk uploads an object is validated many times before saving
dirty checks only reset on save meaning after setting the UPRN the process_uprn_change code would run on every validation, leading to many calls
to solve this, add a flag to the log which blocks further UPRN calls if it tries to set the uprn twice to the same value. if different values are returned then continue checking
this offers a tradeoff between number of api calls and also should not break existing functionality
* send confirmation if user is unconfirmed on password reset
* update copy on password reset page if user is unconfirmed
* fixup! update copy on password reset page if user is unconfirmed
also check if they've been sent a confirmation email
otherwise, this text shows if the user doesn't exist
* CLDC-4033 Fix name of variable
* CLDC-4033: Correct name of resource variable
this override function is passed a resource symbol, not a resource object
---------
Co-authored-by: David May-Miller <David.May-Miller@softwire.com>
* 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
* CLDC-4028: Export records where a related one has updated
for instance, re-export all users in an org if the name updates
rework the export code a little to allow for this to be expressed cleanly
* CLDC-4028: Add tests
* Reapply "CLDC-4043: Ensure that if an Organisation merge fails due to a valida…" (#3092)
This reverts commit 13ba0cc735.
* CLDC-4034: TEST throw RecordInvalid on merge
* Revert "CLDC-4034: TEST throw RecordInvalid on merge"
This reverts commit 9f1155ad13.
* CLDC-NONE: Document release process
* fixup! CLDC-NONE: Document release process
make more specific to the code
* fixup! CLDC-NONE: Document release process
move this to the existing infrastructure section
* Bump activerecord from 7.2.2.1 to 7.2.2.2
Bumps [activerecord](https://github.com/rails/rails) from 7.2.2.1 to 7.2.2.2.
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v8.0.2.1/activerecord/CHANGELOG.md)
- [Commits](https://github.com/rails/rails/compare/v7.2.2.1...v7.2.2.2)
---
updated-dependencies:
- dependency-name: activerecord
dependency-version: 7.2.2.2
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
* CLDC-NONE: fix test impacted by BigInteger update
calculator verifies that this is the correct answer and previous was wrong
* CLDC-NONE: fix financial test impacted by BigInteger update
19.99 / 2 rounds to 10 so this test looks to be wrong
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Samuel Young <samuel.young@softwire.com>
* CLDC-4074 Updated sales log tests to use filters from the current year instead of a fixed one
* CLDC-4074: Update other sales log tests to use the current year instead of a fixed one
* CLDC-4074: Update more failing tests
* CLDC-4074: Remove some 2024 sales log tests
* CLDC-4074: Ignore a failing request test
* CLDC-4074: Fix lettings log services tests
* CLDC-4074: Fix merge request helper spec
* CLDC-4074: Fix rake tests for 2024 logs
* CLDC-4074: Fix guidance helper tests
* CLDC-4074: Fix skipped tests
* CLDC-4074: Update tests for 2023 edit closing (#3095)
* CLDC-4074: Fix model tests
* CLDC-4074: Fix requests tests
* CLDC-4074: Fix services tests
* CLDC-4074: Fix rake tasks tests
the broken ones only make sense for 2024 logs so feels like timecop is the only option
* CLDC-4074: Specify why some tests are not validated based on year
---------
Co-authored-by: Samuel Young <samuel.young@softwire.com>
* 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>
* ensure nil locations are never overwritten
* add a verifying test
* fixup! add a verifying test
remove unneeded context
* fixup! add a verifying test
clarify test structure
* no longer raise a rollback on merge fail
this caused the error to not be bubbled up correctly, meaning the catch in process_merge_request_job was not being triggered, and so not setting the merge back to ready
raising any exception will trigger a rollback
* update tests
* 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>
* Fix flaky tests - date handling in generate_different_date_within_collection_year
* Update tests to include inclusive range checks for date generation
* Add tasks to just count and surface invalid LettingsLog and SalesLog
* Refactor InvalidLogsHelper module structure
* Refactor InvalidLogsHelper for improved logging and module structure
* Update logging level in InvalidLogsHelper from debug to info for better visibility
* Reorganise includes in invalid_logs.rake
* Refactor InvalidLogsHelper to improve invalid log counting and display
* Enhance logging in InvalidLogsHelper for better tracking of invalid log processing
* Filter logs by status to only process completed entries in InvalidLogsHelper
* Enhance invalid log detection in InvalidLogsHelper to include incomplete subsections and questions
* Refactor InvalidLogsHelper to filter logs by status and enhance invalid log reporting
* Refactor InvalidLogsHelper to optimize invalid log detection and streamline batch processing
* Lint
* Add tasks to just count and surface invalid LettingsLog and SalesLog
* Refactor InvalidLogsHelper module structure
* Refactor InvalidLogsHelper for improved logging and module structure
* Update logging level in InvalidLogsHelper from debug to info for better visibility
* Reorganise includes in invalid_logs.rake
* Refactor InvalidLogsHelper to improve invalid log counting and display
* Enhance logging in InvalidLogsHelper for better tracking of invalid log processing
* Filter logs by status to only process completed entries in InvalidLogsHelper
* Enhance invalid log detection in InvalidLogsHelper to include incomplete subsections and questions
* Add tasks to just count and surface invalid LettingsLog and SalesLog
* Refactor InvalidLogsHelper module structure
* Refactor InvalidLogsHelper for improved logging and module structure
* Update logging level in InvalidLogsHelper from debug to info for better visibility
* Reorganise includes in invalid_logs.rake
* Refactor InvalidLogsHelper to improve invalid log counting and display
* Add tasks to just count and surface invalid LettingsLog and SalesLog
* Refactor InvalidLogsHelper module structure
* Refactor InvalidLogsHelper for improved logging and module structure
* Update logging level in InvalidLogsHelper from debug to info for better visibility
* Reorganise includes in invalid_logs.rake