Commit graph

118 commits

Author SHA1 Message Date
oleghasjanov
29c6c8ff44 Fix ProcessClientHold tests and implementation
This commit addresses several issues with the ProcessClientHold class and its tests:

1. Fixed the test_send_mail_delivers_email test by properly mocking the
   DomainDeleteMailer.forced method with correct parameter signatures
   and adding template_name to the domain.

2. Updated all tests to use Domain.stub_any_instance(:force_delete_scheduled?, true)
   to properly stub the force_delete_scheduled? method.

3. Improved test assertions to ensure proper behavior of the ProcessClientHold class,
   including notification creation and client hold status setting.

4. Added proper error handling in tests to ensure methods don't raise exceptions
   and restore original method implementations after testing.

The changes ensure that the ProcessClientHold class correctly handles client hold
status for domains in the force delete process, properly notifies registrars,
and sends emails when required.
2025-03-06 15:18:16 +02:00
oleghasjanov
ebff7a8321 fix: handle missing force_delete_start date
Update `force_delete_start_date` method to handle cases where `domain.force_delete_start` is not present:
- Return formatted current date plus expire warning period if `force_delete_start` is missing
- Ensure consistent date formatting across scenarios

This change prevents errors when `force_delete_start` is nil and provides a fallback date based on the current date and configured warning period.
2025-02-21 10:40:39 +02:00
Timo Võhmar
5b1a5a6d06
Merge pull request #2755 from internetee/upgrade-registrar-invalid-company-notification
Refactor force delete notifications and improve status handling
2025-02-20 10:11:17 +02:00
Timo Võhmar
98bf7fb594
Merge pull request #2751 from internetee/2742-clienthold-status-must-not-me-reset-unless-the-forcedelete-status-is-reset
fix: prevent client_hold status from returning after manual removal
2025-02-19 15:38:17 +02:00
oleghasjanov
be5bba09fb Refactor force delete notifications and improve status handling
- 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
2025-02-17 12:31:51 +02:00
oleghasjanov
6194c5c58a fix: prevent client_hold status from returning after manual removal
- Add flag in force_delete_data to track manual client_hold removal
- Update ProcessClientHold to respect manual status removal
- Add test to verify client_hold doesn't return after admin removes it

When an admin manually removes the client_hold status from a domain,
it should not be automatically re-added by the ProcessClientHold job.
This change tracks manual removals and prevents the status from being
re-added while maintaining the force delete process.
2025-02-10 13:42:19 +02:00
oleghasjanov
dcf9447f97 added update whois job skipping for lifting FG 2025-02-03 14:08:50 +02:00
oleghasjanov
bbdf44583c updated WhoisUpdateJob condition for running 2025-02-03 14:08:50 +02:00
oleghasjanov
9d036f9af3 added virtual attribute for skip whois update 2025-02-03 14:08:50 +02:00
oleghasjanov
2ec545b3aa feat: add status notes to force delete notifications
- 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
2025-02-03 14:08:50 +02:00
oleghasjanov
6facbc8302 updated poll message 2024-12-19 11:15:23 +02:00
oleghasjanov
b229613b8a feat: Add invalid ident notification for company register status checks
- Add notification system for invalid company identifications
- Update force delete notifications to handle invalid company cases
- Add translations for invalid ident messages (ET/EN)
- Add test coverage for invalid ident scenarios
- Remove debug logging from force delete process
- Clean up unused CSV templates

This change improves handling of invalid company identifications in the
Estonian business registry by providing proper notifications to registrars
and ensuring appropriate status updates.
2024-12-17 14:08:57 +02:00
oleghasjanov
ba9aeb437d remove logs, fixed company register status job 2024-11-08 12:46:17 +02:00
oleghasjanov
b3ac165bd3 added logs 2024-11-08 12:46:17 +02:00
oleghasjanov
6ff5e55a24 business contact validation + tests 2024-11-08 12:45:12 +02:00
Sergei Tsoganov
d3bca1434c Refactored and corrected code for domain force delete 2023-05-17 16:04:40 +03:00
olegphenomenon
51dd9dc112 added condition for send expired email 2022-12-02 12:41:55 +02:00
olegphenomenon
17b9cf0ffc send expire email for multiyear domains 2022-12-02 11:12:48 +02:00
olegphenomenon
23b2136949 added checker for nil value 2022-09-05 14:33:40 +03:00
Thiago Youssef
943dedd194 Remove deprecated statuses_before_force_delete field 2022-05-24 16:36:21 +03:00
olegphenomenon
e320a7ced1 fix poll message spam after validation email 2022-04-12 15:32:21 +03:00
Thiago Youssef
3067db0f0e Merge pull request #2284 from internetee/2242-fd-for-hold-domains
Disable force delete for domains with HOLD status by invalid email reason
2022-03-15 15:45:12 +02:00
dinsmol
04de5da193 Add condition for start force delete 2022-02-03 00:33:38 +03:00
dinsmol
8cab4f6df4 Fix tests and errors 2022-01-17 17:16:05 +03:00
olegphenomenon
ba48132547 update mx condition for invalid emails 2021-12-23 14:45:44 +02:00
Timo Võhmar
d67af520b8
Merge pull request #2197 from internetee/2195-setting-fd-to-locked-domains-remove-delete-prohibited-status
2195 setting fd to locked domains remove delete prohibited status
2021-10-25 09:34:37 +03:00
Timo Võhmar
38ceccfadc
Merge pull request #2187 from internetee/2185-mail-validation-event-threshold-not-applied
2185 mail validation event threshold not applied
2021-10-22 15:40:02 +03:00
olegphenomenon
6a050f9ce3 updated restore function 2021-10-22 14:51:58 +03:00
olegphenomenon
f65063f6a5 removed delete prohibited remover 2021-10-22 12:15:38 +03:00
Timo Võhmar
dbb58bc2e7
Merge pull request #2167 from internetee/93-locked-domains-failed-after-fc
93 locked domains failed after fc
2021-10-21 11:02:06 +03:00
olegphenomenon
3a8ab93dd7 fixed iteraction 2021-10-14 13:35:30 +03:00
olegphenomenon
b10a72f763 changed condition for lift FD 2021-10-14 12:31:52 +03:00
Alex Sherman
d48b0f4401 Fixed FD test for new behaviour 2021-10-07 16:18:02 +05:00
Alex Sherman
90f862aa8f Fix views & email_verifable inclusion 2021-10-07 16:18:02 +05:00
olegphenomenon
a896e78e51 updated tests 2021-09-24 14:18:39 +03:00
dinsmol
e0c47cdb35 fixed codeclimate errors 2021-09-09 14:05:29 +03:00
dinsmol
e7e3278267 fixed codeclimate errors 2021-09-09 13:06:51 +03:00
dinsmol
f4e0084895 fixed codeclimate errors (partically) 2021-09-09 09:19:09 +03:00
dinsmol
62d1ba45a2 fixed ArgumentError 2021-09-03 16:12:16 +03:00
Alex Sherman
85475f46df Fix possible transaction retries by setting idempotency 2021-08-31 12:37:59 +05:00
Oleg Hasjanov
96bc237484 implement mechanism of save statuses for force delete and lock 2021-07-14 12:04:55 +03:00
Oleg Hasjanov
4a8bdc14a1 refactoring 2021-05-17 14:46:48 +03:00
Oleg Hasjanov
0ccfd0d8d4 added test 2021-05-17 14:24:51 +03:00
Oleg Hasjanov
6663609550 refactoring 2021-05-17 13:59:38 +03:00
Oleg Hasjanov
2c37e30923 changed method for add additional mails in status notes 2021-05-17 13:35:15 +03:00
Alex Sherman
9df52af96b Fix domain update confirm if pendong_json current_user_id got non-string values 2021-05-10 11:52:33 +05:00
Alex Sherman
11d97358c1 Fix CC issues 2021-05-06 12:17:19 +05:00
Alex Sherman
79351d50d9 Add epp errors support to bulk renew 2021-05-06 12:15:15 +05:00
Alex Sherman
c6f0c3f6a7 Fix some interaction calls 2021-04-26 14:03:41 +05:00
Alex Sherman
fbe63ae062 Quickfix expired domain job log message 2021-04-15 15:06:13 +05:00