* Send success email to merged users
* Update template id, date and remove username
* Send absorbing organisation success mail
* Update absorbing organisation email
* Only send emails to active users
* typo
* Send a different email is only one organisation is absorbed
* Add missing addresses csv job
* Update missing addresses csv service methods
* Add rake task
* Update the job to send missing town or city templates
* Update service to create mising town or city templates
* Add send missing town or city csv rake task
* Add IDs to the CSVs
* Put all log in the same csv
* Add issue type column
* Write wrong uprn logs to csv
* Add mailer methods
* Skip uprn issue for specified orgs
* Add sales csv rake task
* set SKIP_UPRN_ISSUE_ORG_IDS on review apps
* test
* Update notify template IDs for testing
* Initialize service with organisation instead of a hash
* Add expiration time to url
* Add optional tags and remove LA from csv
* Extract log to csv methods
* Update casing
* Update old IDs in factories
* Move constant
* Extract some repeating scopes
* Pass in organisations to skip instead of using an env var
* update template id for sales
* Update link expiry time and headers
* Lower the threshold for testing
* Add issue explanation to the email
* Add how to fix
* update emails
* CLDC-2810 Create all addresses CSV (#1953)
* Add rake tasks for creating all addresses CSV
* Write headers if logs don't exist, update header names
* Rename method
* CLDC-2810 Correct addresses from csv (#1957)
* Updating importing lettings addresses form csv
* Add import_sales_addresses_from_csv rake
* Allow correcting addresses from both templates
* escape .
* Reinfer LA if the postcode hasn't changed
* Update labels and email content
* Update missing addresses threshold
* Remove unused env var
* Send notification to old email address when changing it
* send email changed notification to old email
* Add specs
* send both emails
* Only send required confirmation emails
* Show flash notice
* Use reconfirmable template only if not confirmed
* Don't commit .env.development
* new email flow also when updating own email
* Add mailer
* Instantiate logs only where needed
* Update banner to handle all possible permutations
* wip
* Send confirmation email to user
* Address PO review
* Sends a correct email if there are only soft validations
* Add soft errors valid page
* Add soft errors confirm page
* Confirm the soft validations
* Reuse the how to fix template for check soft validations email
* Update email link
* Move soft validation confirmation to processor
* Correctly set the log status, remove redundant confirm_soft_validations
* Redirect successful upload to logs index and display a success banner
* Implement the soft validations only journey for sales logs
* Display the soft validation errors on the soft-errors-valid page
* Fix page alignment
* Fix tests by mapping housingneeds in csv hepler
* Add the sales soft validations to unpend_and_confirm_soft_validations
* Change naming
* Update method names
* refactor
* undo typo
* Only set the existing soft validations for correct types
* Fix path name
* Add missing error mappings for location fields
* Add missing tests and cancel button
* Change some wording
* Typos
* show summary when on error threshold
* remove bulk upload mailer template
- this template is no longer used
* setup errors do not consider threshold
- return approprate intro test depending if there are setup errors or
not
* add first page for bulk upload resume journey
* bulk upload resume handles upload again
* add confirm page to bulk upload resume journey
* replace placeholder count with correct value
* apply recommendation for bulk upload resume choice
* add how to fix bulk upload mailer
* integrate new bulk upload approve journey
* add missing bulk upload error mappings
* remove test
* prevent approve being called multiple times
* bulk upload creates invisible logs ahead of time
* work invisible logs into bulk upload flow
* sort errors so deterministic
* remove unused ensure
* remove expected_log_count and processed
- these fields are no longer used or needed
* introduce pending status
* swap visible for pending logs
* only show visible lettings logs
* hard code status filters
* remove unused model methods
* only show visible sales logs
* form controller ignores hidden logs
* locations and schemes only affect visible logs
* tweak bulk upload email copy formatting
* change bulk upload summary error report
- this is now tabbed with the full report
- also summary report has now changed from single table to multiple
tables
* bulk upload cannot navigate to summary report
- as when sent to view full report the user does not have enough
errors that need summarising
* add placeholder tests for bulk upload mailer
* bulk upload fix setup errors email
- this plumbs in the condition so if any setup sections are incomplete we
send that partcular email and prevent the remaining flow
* tag bulk upload setup errors for downsteam use
* add category to bulk upload errors
* persist bulk upload error category
* populate bulk upload mailer with errors
* bulk upload error summary min limit
- the errors summary table only show errors for column where there
at least 16 errors for that column
- if there are fewer than 16 errors that can see detailed report to pin
point and fix those specific issues
* add #errors? to summary component
* show full error report if not enough errors
- if errors summary table is empty as below threshold
- send users to full report
- remove the back button so they cannot access summary report
* add upload again cta otherwise a dead end
* refactor bulk upload with extract method
* add bulk upload mailer test
* bulk upload mails users to fix logs on website
* bulk uplad email change resume link
* refactor local variable name
* CLDC-1688 Affected logs mailer
* CLDC-1688 Correct update_logs path
* CLDC-1688 Review markups
Co-authored-by: James Rose <james@jbpr.net>
Update app/controllers/schemes_controller.rb
Co-authored-by: James Rose <james@jbpr.net>
Update app/controllers/locations_controller.rb
Co-authored-by: James Rose <james@jbpr.net>
* Refactor to queue messages
* Update test
* remove irrelevant test
Co-authored-by: James Rose <james@jbpr.net>
Co-authored-by: Kat <katrina@kosiak.co.uk>
* Replaced log CSV direct download with email
* Tidy up authorization of organisations controller
- We already have a method to authenticate the scope of the user, so we can reuse that.
* Use Rails routes instead of absolute paths for CSV download links
* Introduce base NotifyMailer to to abstract away shared Notify mail functionality
* Fix mailer spec name
* Add worker instance to PaaS manifest
* Add CSV download bucket instance name into environment
* Update tests for improved search term handling
* Fix download mailer tests
* Clarifying comments
Co-authored-by: natdeanlewissoftwire <nat.dean-lewis@softwire.com>
Co-authored-by: James Rose <james@jbpr.net>