diff --git a/src/package-lock.json b/src/package-lock.json index 18a5de770..dc1464ee8 100644 --- a/src/package-lock.json +++ b/src/package-lock.json @@ -4086,9 +4086,9 @@ } }, "node_modules/normalize-package-data/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "bin": { "semver": "bin/semver" @@ -10148,9 +10148,9 @@ }, "dependencies": { "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true } } diff --git a/src/registrar/admin.py b/src/registrar/admin.py index a3e1de1af..182543c19 100644 --- a/src/registrar/admin.py +++ b/src/registrar/admin.py @@ -280,7 +280,7 @@ class DomainApplicationAdmin(ListHeaderAdmin): # for the side effects (like an email send). Same # comment applies to original_obj method calls below. original_obj.submit(updated_domain_application=obj) - elif obj.status == models.DomainApplication.INVESTIGATING: + elif obj.status == models.DomainApplication.IN_REVIEW: original_obj.in_review(updated_domain_application=obj) elif obj.status == models.DomainApplication.ACTION_NEEDED: original_obj.action_needed(updated_domain_application=obj) diff --git a/src/registrar/fixtures.py b/src/registrar/fixtures.py index 35a72ab15..909ff5f58 100644 --- a/src/registrar/fixtures.py +++ b/src/registrar/fixtures.py @@ -202,11 +202,11 @@ class DomainApplicationFixture: "organization_name": "Example - Submitted but pending Investigation", }, { - "status": "investigating", + "status": "in review", "organization_name": "Example - In Investigation", }, { - "status": "investigating", + "status": "in review", "organization_name": "Example - Approved", }, { @@ -378,9 +378,9 @@ class DomainFixture(DomainApplicationFixture): return for user in users: - # approve one of each users investigating status domains + # approve one of each users in review status domains application = DomainApplication.objects.filter( - creator=user, status=DomainApplication.INVESTIGATING + creator=user, status=DomainApplication.IN_REVIEW ).last() logger.debug(f"Approving {application} for {user}") application.approve() diff --git a/src/registrar/migrations/0028_alter_domainapplication_status.py b/src/registrar/migrations/0028_alter_domainapplication_status.py index f17b4729d..61b1c0505 100644 --- a/src/registrar/migrations/0028_alter_domainapplication_status.py +++ b/src/registrar/migrations/0028_alter_domainapplication_status.py @@ -1,4 +1,6 @@ # Generated by Django 4.2.2 on 2023-07-12 21:31 +# Generated by Django 4.2.2 on 2023-07-13 17:56 +# hand merged from django.db import migrations import django_fsm @@ -17,7 +19,7 @@ class Migration(migrations.Migration): choices=[ ("started", "started"), ("submitted", "submitted"), - ("investigating", "investigating"), + ("in review", "in review"), ("action needed", "action needed"), ("approved", "approved"), ("withdrawn", "withdrawn"), diff --git a/src/registrar/models/domain_application.py b/src/registrar/models/domain_application.py index b7b371619..310471c35 100644 --- a/src/registrar/models/domain_application.py +++ b/src/registrar/models/domain_application.py @@ -21,7 +21,7 @@ class DomainApplication(TimeStampedModel): # #### Constants for choice fields #### STARTED = "started" SUBMITTED = "submitted" - INVESTIGATING = "investigating" + IN_REVIEW = "in review" ACTION_NEEDED = "action needed" APPROVED = "approved" WITHDRAWN = "withdrawn" @@ -29,7 +29,7 @@ class DomainApplication(TimeStampedModel): STATUS_CHOICES = [ (STARTED, STARTED), (SUBMITTED, SUBMITTED), - (INVESTIGATING, INVESTIGATING), + (IN_REVIEW, IN_REVIEW), (ACTION_NEEDED, ACTION_NEEDED), (APPROVED, APPROVED), (WITHDRAWN, WITHDRAWN), @@ -544,7 +544,7 @@ class DomainApplication(TimeStampedModel): "emails/submission_confirmation_subject.txt", ) - @transition(field="status", source=SUBMITTED, target=INVESTIGATING) + @transition(field="status", source=SUBMITTED, target=IN_REVIEW) def in_review(self, updated_domain_application): """Investigate an application that has been submitted. @@ -561,7 +561,7 @@ class DomainApplication(TimeStampedModel): "emails/status_change_in_review_subject.txt", ) - @transition(field="status", source=[INVESTIGATING, REJECTED], target=ACTION_NEEDED) + @transition(field="status", source=[IN_REVIEW, REJECTED], target=ACTION_NEEDED) def action_needed(self, updated_domain_application): """Send back an application that is under investigation or rejected. @@ -574,7 +574,7 @@ class DomainApplication(TimeStampedModel): ) @transition( - field="status", source=[SUBMITTED, INVESTIGATING, REJECTED], target=APPROVED + field="status", source=[SUBMITTED, IN_REVIEW, REJECTED], target=APPROVED ) def approve(self, updated_domain_application=None): """Approve an application that has been submitted. @@ -621,7 +621,7 @@ class DomainApplication(TimeStampedModel): "emails/status_change_approved_subject.txt", ) - @transition(field="status", source=[SUBMITTED, INVESTIGATING], target=WITHDRAWN) + @transition(field="status", source=[SUBMITTED, IN_REVIEW], target=WITHDRAWN) def withdraw(self): """Withdraw an application that has been submitted.""" diff --git a/src/registrar/templates/application_status.html b/src/registrar/templates/application_status.html index 6d635a05a..2488bb449 100644 --- a/src/registrar/templates/application_status.html +++ b/src/registrar/templates/application_status.html @@ -20,7 +20,7 @@ Status: {% if domainapplication.status == 'approved' %} Approved - {% elif domainapplication.status == 'investigating' %} In Review + {% elif domainapplication.status == 'in review' %} In Review {% elif domainapplication.status == 'rejected' %} Rejected {% elif domainapplication.status == 'submitted' %} Received {% else %}ERROR Please contact technical support/dev diff --git a/src/registrar/tests/test_admin.py b/src/registrar/tests/test_admin.py index ee0086b39..4be5f0415 100644 --- a/src/registrar/tests/test_admin.py +++ b/src/registrar/tests/test_admin.py @@ -83,7 +83,7 @@ class TestDomainApplicationAdmin(TestCase): model_admin = DomainApplicationAdmin(DomainApplication, self.site) # Modify the application's property - application.status = DomainApplication.INVESTIGATING + application.status = DomainApplication.IN_REVIEW # Use the model admin's save_model method model_admin.save_model(request, application, form=None, change=True) @@ -118,7 +118,7 @@ class TestDomainApplicationAdmin(TestCase): with boto3_mocking.clients.handler_for("sesv2", mock_client): # Create a sample application - application = completed_application(status=DomainApplication.INVESTIGATING) + application = completed_application(status=DomainApplication.IN_REVIEW) # Create a mock request request = self.factory.post( diff --git a/src/registrar/tests/test_models.py b/src/registrar/tests/test_models.py index 4b5af5c4a..997d5f4e2 100644 --- a/src/registrar/tests/test_models.py +++ b/src/registrar/tests/test_models.py @@ -144,11 +144,11 @@ class TestDomainApplication(TestCase): with self.assertRaises(TransitionNotAllowed): application.submit() - def test_transition_not_allowed_investigating_submitted(self): - """Create an application with status investigating and call submit + def test_transition_not_allowed_in_review_submitted(self): + """Create an application with status in review and call submit against transition rules""" - application = completed_application(status=DomainApplication.INVESTIGATING) + application = completed_application(status=DomainApplication.IN_REVIEW) with self.assertRaises(TransitionNotAllowed): application.submit() @@ -171,7 +171,7 @@ class TestDomainApplication(TestCase): with self.assertRaises(TransitionNotAllowed): application.submit() - def test_transition_not_allowed_started_investigating(self): + def test_transition_not_allowed_started_in_review(self): """Create an application with status started and call in_review against transition rules""" @@ -180,16 +180,16 @@ class TestDomainApplication(TestCase): with self.assertRaises(TransitionNotAllowed): application.in_review() - def test_transition_not_allowed_investigating_investigating(self): - """Create an application with status investigating and call in_review + def test_transition_not_allowed_in_review_in_review(self): + """Create an application with status in review and call in_review against transition rules""" - application = completed_application(status=DomainApplication.INVESTIGATING) + application = completed_application(status=DomainApplication.IN_REVIEW) with self.assertRaises(TransitionNotAllowed): application.in_review() - def test_transition_not_allowed_approved_investigating(self): + def test_transition_not_allowed_approved_in_review(self): """Create an application with status approved and call in_review against transition rules""" @@ -198,7 +198,7 @@ class TestDomainApplication(TestCase): with self.assertRaises(TransitionNotAllowed): application.in_review() - def test_transition_not_allowed_action_needed_investigating(self): + def test_transition_not_allowed_action_needed_in_review(self): """Create an application with status action needed and call in_review against transition rules""" @@ -207,7 +207,7 @@ class TestDomainApplication(TestCase): with self.assertRaises(TransitionNotAllowed): application.in_review() - def test_transition_not_allowed_rejected_investigating(self): + def test_transition_not_allowed_rejected_in_review(self): """Create an application with status rejected and call in_review against transition rules""" @@ -216,7 +216,7 @@ class TestDomainApplication(TestCase): with self.assertRaises(TransitionNotAllowed): application.in_review() - def test_transition_not_allowed_withdrawn_investigating(self): + def test_transition_not_allowed_withdrawn_in_review(self): """Create an application with status withdrawn and call in_review against transition rules"""