Tweak email templates, model copy

This commit is contained in:
Rachid Mrad 2024-02-26 17:28:29 -05:00
parent dd247977c7
commit d860bbdb8b
No known key found for this signature in database
4 changed files with 25 additions and 31 deletions

View file

@ -1,4 +1,4 @@
# Generated by Django 4.2.7 on 2024-02-16 19:36
# Generated by Django 4.2.7 on 2024-02-26 22:12
from django.db import migrations, models
@ -15,19 +15,13 @@ class Migration(migrations.Migration):
field=models.TextField(
blank=True,
choices=[
("domain_purpose", "Domain purpose requirements not met"),
("requestor", "Requestor isn't authorized to make the request"),
(
"second_domain_reasoning",
"Organization already has a domain and does not provide sufficient reasoning for a second domain",
),
(
"contacts_or_organization_legitimacy",
"Research could not corroborate legitimacy of contacts or organization",
),
("organization_eligibility", "Organization isn't eligible for a .gov"),
("naming_requirements", "Naming requirements not met"),
("other", "Other"),
("purpose_not_met", "Purpose requirements not met"),
("requestor_not_eligible", "Requestor not eligible to make request"),
("org_has_domain", "Org already has a .gov domain"),
("contacts_not_verified", "Org contacts couldn't be verified"),
("org_not_eligible", "Org not eligible for a .gov domain"),
("naming_not_met", "Naming requirements not met"),
("other", "Other/Unspecified"),
],
null=True,
),

View file

@ -352,19 +352,19 @@ class DomainApplication(TimeStampedModel):
AGENCY_CHOICES = [(v, v) for v in AGENCIES]
class RejectionReasons(models.TextChoices):
DOMAIN_PURPOSE = "domain_purpose", "Domain purpose requirements not met"
REQUESTOR = "requestor", "Requestor isn't authorized to make the request"
DOMAIN_PURPOSE = "purpose_not_met", "Purpose requirements not met"
REQUESTOR = "requestor_not_eligible", "Requestor not eligible to make request"
SECOND_DOMAIN_REASONING = (
"second_domain_reasoning",
"Organization already has a domain and does not provide sufficient reasoning for a second domain",
"org_has_domain",
"Org already has a .gov domain",
)
CONTACTS_OR_ORGANIZATION_LEGITIMACY = (
"contacts_or_organization_legitimacy",
"Research could not corroborate legitimacy of contacts or organization",
"contacts_not_verified",
"Org contacts couldn't be verified",
)
ORGANIZATION_ELIGIBILITY = "organization_eligibility", "Organization isn't eligible for a .gov"
NAMING_REQUIREMENTS = "naming_requirements", "Naming requirements not met"
OTHER = "other", "Other"
ORGANIZATION_ELIGIBILITY = "org_not_eligible", "Org not eligible for a .gov domain"
NAMING_REQUIREMENTS = "naming_not_met", "Naming requirements not met"
OTHER = "other", "Other/Unspecified"
# #### Internal fields about the application #####
status = FSMField(

View file

@ -9,7 +9,7 @@ STATUS: Rejected
----------------------------------------------------------------
{% if application.rejection_reason != 'other' %}
REJECTION REASON{% endif %}{% if application.rejection_reason == 'domain_purpose' %}
REJECTION REASON{% endif %}{% if application.rejection_reason == 'purpose_not_met' %}
Your domain request was rejected because the purpose you provided did not meet our
requirements. You didnt provide enough information about how you intend to use the
domain.
@ -18,7 +18,7 @@ Learn more about:
- Eligibility for a .gov domain <https://get.gov/domains/eligibility>
- What you can and cant do with .gov domains <https://get.gov/domains/requirements/>
If you have questions or comments, reply to this email.{% elif application.rejection_reason == 'requestor' %}
If you have questions or comments, reply to this email.{% elif application.rejection_reason == 'requestor_not_eligible' %}
Your domain request was rejected because we dont believe youre eligible to request a
.gov domain on behalf of {{ application.organization_name }}. You must be a government employee, or be
working on behalf of a government organization, to request a .gov domain.
@ -26,7 +26,7 @@ working on behalf of a government organization, to request a .gov domain.
DEMONSTRATE ELIGIBILITY
If you can provide more information that demonstrates your eligibility, or you want to
discuss further, reply to this email.{% elif application.rejection_reason == 'second_domain_reasoning' %}
discuss further, reply to this email.{% elif application.rejection_reason == 'org_has_domain' %}
Your domain request was rejected because {{ application.organization_name }} has a .gov domain. Our
practice is to approve one domain per online service per government organization. We
evaluate additional requests on a case-by-case basis. You did not provide sufficient
@ -35,9 +35,9 @@ justification for an additional domain.
Read more about our practice of approving one domain per online service
<https://get.gov/domains/before/#one-domain-per-service>.
If you have questions or comments, reply to this email.{% elif application.rejection_reason == 'contacts_or_organization_legitimacy' %}
If you have questions or comments, reply to this email.{% elif application.rejection_reason == 'contacts_not_verified' %}
Your domain request was rejected because we could not verify the organizational
contacts you provided. If you have questions or comments, reply to this email.{% elif application.rejection_reason == 'organization_eligibility' %}
contacts you provided. If you have questions or comments, reply to this email.{% elif application.rejection_reason == 'org_not_eligible' %}
Your domain request was rejected because we determined that {{ application.organization_name }} is not
eligible for a .gov domain. .Gov domains are only available to official U.S.-based
government organizations.
@ -48,7 +48,7 @@ If you can provide documentation that demonstrates your eligibility, reply to th
This can include links to (or copies of) your authorizing legislation, your founding
charter or bylaws, or other similar documentation. Without this, we cant approve a
.gov domain for your organization. Learn more about eligibility for .gov domains
<https://get.gov/domains/eligibility/>.{% elif application.rejection_reason == 'naming_requirements' %}
<https://get.gov/domains/eligibility/>.{% elif application.rejection_reason == 'naming_not_met' %}
Your domain request was rejected because it does not meet our naming requirements.
Domains should uniquely identify a government organization and be clear to the
general public. Learn more about naming requirements for your type of organization

View file

@ -784,7 +784,7 @@ class TestDomainApplicationAdmin(MockEppLib):
self.transition_state_and_send_email(application, DomainApplication.ApplicationStatus.APPROVED)
self.assertEqual(len(self.mock_client.EMAILS_SENT), 3)
def test_save_model_sends_rejected_email_domain_purpose(self):
def test_save_model_sends_rejected_email_purpose_not_met(self):
"""When transitioning to rejected on a domain request, an email is sent
explaining why when the reason is domain purpose."""
@ -843,7 +843,7 @@ class TestDomainApplicationAdmin(MockEppLib):
self.assert_email_is_accurate("Congratulations! Your .gov domain request has been approved.", 1, EMAIL)
self.assertEqual(len(self.mock_client.EMAILS_SENT), 2)
def test_save_model_sends_rejected_email_second_domain_reasoning(self):
def test_save_model_sends_rejected_email_org_has_domain(self):
"""When transitioning to rejected on a domain request, an email is sent
explaining why when the reason is second domain."""