Update schedule_force_delete to include kandeliik_tekstina as a parameter
Modify soft_delete_company to include kandeliik_tekstina parameter
Append company registry deletion reason to force delete notes when available
Pass nil to schedule_force_delete when company details response is empty
- Add force_delete_domain_statuses_history_data to store force delete metadata
- Update force delete queries to use new JSON status history
- Refactor force delete tests to use travel_to helper
- Remove direct force_delete_start field usage
- Update status notes to include company identification number
- Add tracking of lifted force delete domains with reason and date in json_statuses_history
- Modify ForceDeleteDailyAdminNotifierJob to include both force deleted and lifted domains
- Update admin mailer template to show separate tables for force deleted and lifted domains
- Update tests to reflect new functionality and fix timing issues with yesterday's data
Key changes:
- Store lift reason and date when canceling force delete
- Add new query method for finding lifted force delete domains
- Split email template into two sections
- Fix tests to properly handle the yesterday time window
This commit implements a reliable connection error handling solution for the
Company Register API integration. The job previously failed when connection
errors occurred without proper recovery mechanisms.
The implementation:
Adds a lightweight Retryable module with configurable retry logic
Implements smart caching of API responses (1 day expiration)
Handles common network errors like KeepAliveDisconnected and timeouts
Provides a fallback mechanism when all retry attempts fail
Ensures test reliability with cache-skipping in test environment
Testing:
Added specific tests for both recovery and fallback scenarios
Verified cache behavior in production and test environments
Resolves connection errors observed in production logs without adding
unnecessary complexity to the codebase.
- Add force delete type and start date to notifications
- Extract company status notes logic into separate method
- Standardize status message formatting for both soft and fast track deletes
- Update translation templates to include force delete type and start date info
- Add Estonian translation for new notification fields
fix: improve company register status messages
- Update error message for missing company in registry
- Clarify status message format for existing companies
- Update dependencies: logger (1.6.5) and net-smtp (0.5.1)
The changes make company status messages more descriptive and clearer
for administrators when a company's registration status triggers domain
deletion. Messages now explicitly state whether a contact was not found
or has a specific status in the business registry.
- Extract liquidation email logic into separate method `send_email_for_liquidation`
- Add early return for bankrupt companies
- Remove redundant logging for bankrupt companies
- Simplify status handling conditions
- Move company status handling logic into a separate method `handle_company_statuses`
- Improve code readability by splitting proceed_company_status method
- Keep status update logic after handling company statuses
- Move company status handling logic into a separate method `handle_company_statuses`
- Improve code readability by splitting proceed_company_status method
- Keep status update logic after handling company statuses
- Add email notification for soft delete process
- Include company status information in force delete notes
- Add validation check to prevent duplicate force delete scheduling
- Pass additional context (reason, email) to force delete process
This improves the soft delete process by providing more detailed
information about why the domain is being force deleted and ensures
proper notification to the contact.
- Add notes parameter to force delete interactions to provide more context
- Include company registry status in force delete notifications
- Add status mapping constants for better readability
- Move status note assignment before save in force delete process
Technical details:
- Add notes field to Domains::ForceDelete::Base interaction
- Update force delete notifications to include status notes
- Add REGISTRY_STATUSES mapping in CompanyRegisterStatusJob
- Update tests to verify new notification format
fix: add nil check for registrant in phone checker job
Add a guard clause to handle cases where registrant_user is not found
in execute_single_checker method. This prevents potential NoMethodError
when trying to check phone number for non-existent registrant.
Previously the method would raise an error when registrant_user_code
was invalid or not found in the database.
- Add OrgRegistrantPhoneCheckerJob execution for contact creation and update
- Rename validate_* methods to maybe_validate_* for consistency
- Add tests for phone number validation in REPP API
- Fix method naming and add proper job arguments
This ensures phone numbers are validated against company register data
for Estonian organization contacts after creation or update.
- Replace RegistrantUser.find_by with Contact model query
- Add proper scoping for organization contacts from Estonia
- Include join with registrant domains
This ensures consistent contact lookup between bulk and single checker methods
WHAT:
- Removed debug output line from PostSetProcess
- Fixed force_delete_start date comparison in admin notifier job
WHY:
- Debug output was adding noise to logs and wasn't necessary
HOW:
- Removed puts statement for domain status debugging
- Changed query to use exact timestamp comparison for force_delete_start
- Refactor CompanyRegisterStatusJob for better readability and error handling
- Update whitelisted_companies to use JSON parsing with fallback
- Fix company register status check in tests with proper mock data
- Remove debug logging statements
- Add null check for domain status notes
- Update test dependencies (Capybara and Selenium) for better stability