Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: restore company validation for Estonian organizations #2723

Open
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

OlegPhenomenon
Copy link
Contributor

  • Re-enable company validation logic for Estonian organization contacts
  • Update company_register gem to use master branch
  • Restore and update company validation tests
  • Add additional check for Estonian country code in validation

This change ensures that only registered or liquidated Estonian companies can be used when creating organizational contacts.

- Re-enable company validation logic for Estonian organization contacts
- Update company_register gem to use master branch
- Restore and update company validation tests
- Add additional check for Estonian country code in validation

This change ensures that only registered or liquidated Estonian companies
can be used when creating organizational contacts.
- Switch company_register branch to issues-with-upcoming-data
- Convert ident to string when querying company data
- Add extended logging in CompanyRegisterStatusJob
- Disable automatic merging in renovate.json

Technical changes:
- Update dependencies: date, net-protocol, net-smtp, timeout
- 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
- 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.
Use direct accessor method for template_name instead of hash access since force_delete_data is stored as hstore
Only attempt to cancel force delete for domains that actually have it scheduled.
This prevents unnecessary method calls and potential errors.
- 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
- 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
@OlegPhenomenon OlegPhenomenon force-pushed the company-validator-during-creation branch from ed135fa to 6d65742 Compare February 3, 2025 12:09
@vohmar
Copy link
Contributor

vohmar commented Feb 4, 2025

Please fix a message that is logged when a company could not be found in the business registry:
for example:
Force delete set on domain näiteks.ee. Outzone date: 2025-02-13 00:00:00 +0200. Purge date: 2025-03-15 00:00:00 +0200. Invalid ident 1234567. Contact has status No information

The message "Contact has status No information" is hard to understand. Change the message to something like
"Contact not found" or "Contact not found in EE business registry"

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants