From 0952c9d216a8a9f356332a879a5f6a85b115964a Mon Sep 17 00:00:00 2001 From: asaki222 Date: Wed, 23 Oct 2024 23:01:27 -0400 Subject: [PATCH 01/12] made text changes --- src/registrar/templates/domain_request_dotgov_domain.html | 7 +------ .../portfolio_domain_request_additional_details.html | 3 ++- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/registrar/templates/domain_request_dotgov_domain.html b/src/registrar/templates/domain_request_dotgov_domain.html index 764154254..1456a61c2 100644 --- a/src/registrar/templates/domain_request_dotgov_domain.html +++ b/src/registrar/templates/domain_request_dotgov_domain.html @@ -6,7 +6,7 @@

@@ -19,11 +19,6 @@

Note that only federal agencies can request generic terms like vote.gov.

- -

Domain examples for your type of organization

-
- {% include "includes/domain_example.html" %} -
{% endblock %} diff --git a/src/registrar/templates/portfolio_domain_request_additional_details.html b/src/registrar/templates/portfolio_domain_request_additional_details.html index 3b004354f..4ea830f0b 100644 --- a/src/registrar/templates/portfolio_domain_request_additional_details.html +++ b/src/registrar/templates/portfolio_domain_request_additional_details.html @@ -9,12 +9,13 @@
+

Required fields are marked with an asterisk (*).

Is there anything else you’d like us to know about your domain request?

-

Provide details below. *

+

Provide details below. *

{% with attr_maxlength=2000 add_label_class="usa-sr-only" %} {% input_with_errors forms.0.anything_else %} {% endwith %} From 337e6e5705c203887a7ef9b04484160d8493d3cc Mon Sep 17 00:00:00 2001 From: asaki222 Date: Thu, 24 Oct 2024 13:39:33 -0400 Subject: [PATCH 02/12] updated with org model flag --- .../templates/domain_request_dotgov_domain.html | 10 ++++++++++ .../portfolio_domain_request_additional_details.html | 11 ++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/registrar/templates/domain_request_dotgov_domain.html b/src/registrar/templates/domain_request_dotgov_domain.html index 1456a61c2..b81a59662 100644 --- a/src/registrar/templates/domain_request_dotgov_domain.html +++ b/src/registrar/templates/domain_request_dotgov_domain.html @@ -6,7 +6,11 @@
  • Be available
  • Relate to your organization’s name, location, and/or services
  • + {% if has_organization_feature_flag %}
  • Be clear to the general public. Your domain name must not be easily confused with other organizations.
  • + {% else %} +
  • Be unlikely to mislead or confuse the general public (even if your domain is only intended for a specific audience)
  • + {% end %}

@@ -19,6 +23,12 @@

Note that only federal agencies can request generic terms like vote.gov.

+ {% if not has_organization_feature_flag%} +

Domain examples for your type of organization

+
+ {% include "includes/domain_example.html" %} +
+ {% endif %} {% endblock %} diff --git a/src/registrar/templates/portfolio_domain_request_additional_details.html b/src/registrar/templates/portfolio_domain_request_additional_details.html index 4ea830f0b..f04fedef2 100644 --- a/src/registrar/templates/portfolio_domain_request_additional_details.html +++ b/src/registrar/templates/portfolio_domain_request_additional_details.html @@ -7,15 +7,20 @@ {% block form_fields %} -
- -

Required fields are marked with an asterisk (*).

+
+ {% if has_organization_feature_flag %} +

Required fields are marked with an asterisk (*).

+ {% endif %}

Is there anything else you’d like us to know about your domain request?

+ {% if has_organization_feature_flag %}

Provide details below. *

+ {% else %} +

Provide details below. *

+ {% end %} {% with attr_maxlength=2000 add_label_class="usa-sr-only" %} {% input_with_errors forms.0.anything_else %} {% endwith %} From dc666e4699c68e628e12083c3cd941098f304ca3 Mon Sep 17 00:00:00 2001 From: asaki222 Date: Thu, 24 Oct 2024 14:34:44 -0400 Subject: [PATCH 03/12] fixed issues --- src/registrar/templates/domain_request_dotgov_domain.html | 2 +- .../portfolio_domain_request_additional_details.html | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/registrar/templates/domain_request_dotgov_domain.html b/src/registrar/templates/domain_request_dotgov_domain.html index b81a59662..9765edb11 100644 --- a/src/registrar/templates/domain_request_dotgov_domain.html +++ b/src/registrar/templates/domain_request_dotgov_domain.html @@ -10,7 +10,7 @@
  • Be clear to the general public. Your domain name must not be easily confused with other organizations.
  • {% else %}
  • Be unlikely to mislead or confuse the general public (even if your domain is only intended for a specific audience)
  • - {% end %} + {% endif %}

    diff --git a/src/registrar/templates/portfolio_domain_request_additional_details.html b/src/registrar/templates/portfolio_domain_request_additional_details.html index f04fedef2..49097fbe9 100644 --- a/src/registrar/templates/portfolio_domain_request_additional_details.html +++ b/src/registrar/templates/portfolio_domain_request_additional_details.html @@ -16,11 +16,7 @@
    - {% if has_organization_feature_flag %}

    Provide details below. *

    - {% else %} -

    Provide details below. *

    - {% end %} {% with attr_maxlength=2000 add_label_class="usa-sr-only" %} {% input_with_errors forms.0.anything_else %} {% endwith %} From 5c9f0bdc23b3f318679117330a591e9dd1e91fb4 Mon Sep 17 00:00:00 2001 From: asaki222 Date: Thu, 24 Oct 2024 14:47:37 -0400 Subject: [PATCH 04/12] fixed issues --- .../portfolio_domain_request_additional_details.html | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/registrar/templates/portfolio_domain_request_additional_details.html b/src/registrar/templates/portfolio_domain_request_additional_details.html index 49097fbe9..3c5b50d6b 100644 --- a/src/registrar/templates/portfolio_domain_request_additional_details.html +++ b/src/registrar/templates/portfolio_domain_request_additional_details.html @@ -7,10 +7,7 @@ {% block form_fields %} -
    - {% if has_organization_feature_flag %} -

    Required fields are marked with an asterisk (*).

    - {% endif %} +

    Is there anything else you’d like us to know about your domain request?

    From 7edd0448282dde5e08bc331814216e44a5b10768 Mon Sep 17 00:00:00 2001 From: matthewswspence Date: Fri, 25 Oct 2024 11:01:37 -0500 Subject: [PATCH 05/12] revert --- .github/workflows/clone-staging.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/clone-staging.yaml b/.github/workflows/clone-staging.yaml index ebb0a1a82..4fbb2ccb7 100644 --- a/.github/workflows/clone-staging.yaml +++ b/.github/workflows/clone-staging.yaml @@ -20,7 +20,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - - name: Install Cloud Foundry CLI + - name: Clone uses: cloud-gov/cg-cli-tools@main - name: Clone From 027870e60a0110c9dcbcace07e207c9dce196605 Mon Sep 17 00:00:00 2001 From: matthewswspence Date: Fri, 25 Oct 2024 15:16:17 -0500 Subject: [PATCH 06/12] refactor clone job --- .github/workflows/clone-staging.yaml | 56 ++++++++++++++-------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/.github/workflows/clone-staging.yaml b/.github/workflows/clone-staging.yaml index 4fbb2ccb7..c82d1fa70 100644 --- a/.github/workflows/clone-staging.yaml +++ b/.github/workflows/clone-staging.yaml @@ -12,41 +12,41 @@ on: env: DESTINATION_ENVIRONMENT: ms SOURCE_ENVIRONMENT: staging + jobs: clone-database: runs-on: ubuntu-latest + env: + CF_USERNAME: CF_${{ env.SOURCE_ENVIRONMENT }}_USERNAME + CF_PASSWORD: CF_${{ env.SOURCE_ENVIRONMENT }}_PASSWORD steps: - name: Checkout repository uses: actions/checkout@v3 - - name: Clone + - name: Share DB Service uses: cloud-gov/cg-cli-tools@main + with: + cf_username: ${{ secrets[env.CF_USERNAME] }} + cf_password: ${{ secrets[env.CF_PASSWORD] }} + cf_org: cisa-dotgov + cf_space: ${{ env.DESTINATION_ENVIRONMENT }} + cf_command: share-service getgov-${{ env.DESTINATION_ENVIRONMENT }}-database -s ${{ env.SOURCE_ENVIRONMENT }} - - name: Clone - env: - CF_USERNAME: CF_${{ env.DESTINATION_ENVIRONMENT }}_USERNAME - CF_PASSWORD: CF_${{ env.DESTINATION_ENVIRONMENT }}_PASSWORD - run: | - # login to cf cli - cf login -a api.fr.cloud.gov -u $CF_USERNAME -p $CF_PASSWORD -o cisa-dotgov -s ${{ env.DESTINATION_ENVIRONMENT }} - - # install cg-manage-rds tool - pip install git+https://github.com/cloud-gov/cg-manage-rds.git - - # share the sandbox db with the Staging space - cf share-service getgov-${{ env.DESTINATION_ENVIRONMENT }}-database -s ${{ env.SOURCE_ENVIRONMENT }} - - # target the Staging space - cf target -s ${{ env.SOURCE_ENVIRONMENT }} - - # clone from staging to the sandbox - cg-manage-rds clone getgov-${{ env.SOURCE_ENVIRONMENT }}-database getgov-${{ env.DESTINATION_ENVIRONMENT }}-database - - rm db_backup.sql - - # switch to the target sandbox space - cf target -s ${{ env.DESTINATION_ENVIRONMENT }} - - # un-share the sandbox from Staging - cf unshare-service getgov-${{ env.DESTINATION_ENVIRONMENT }}-database -s ${{ env.SOURCE_ENVIRONMENT }} + - name: Clone Database + uses: cloud-gov/cg-cli-tools@main + with: + cf_username: ${{ secrets.CF_MS_USERNAM }} + cf_password: ${{ secrets.CF_MS_PASSWORD }} + cf_org: cisa-dotgov + cf_space: ${{ env.SOURCE_ENVIRONMENT }} + command: cg-manage-rds clone getgov-${{ env.SOURCE_ENVIRONMENT }}-database getgov-${{ env.DESTINATION_ENVIRONMENT }}-database + + - name: Unshare DB Service + uses: cloud-gov/cg-cli-tools@main + with: + cf_username: ${{ secrets.CF_MS_USERNAM }} + cf_password: ${{ secrets.CF_MS_PASSWORD }} + cf_org: cisa-dotgov + cf_space: ${{ env.SOURCE_ENVIRONMENT }} + cf_command: unshare-service getgov-${{ env.DESTINATION_ENVIRONMENT }}-database -s ${{ env.SOURCE_ENVIRONMENT }} \ No newline at end of file From f35f149542c249c1c1afc1187fd347e9e535b3c5 Mon Sep 17 00:00:00 2001 From: matthewswspence Date: Fri, 25 Oct 2024 16:08:48 -0500 Subject: [PATCH 07/12] remove domains in dns_needed state from current csv reports --- src/registrar/utility/csv_export.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/registrar/utility/csv_export.py b/src/registrar/utility/csv_export.py index ce710ef53..2e5ee4d91 100644 --- a/src/registrar/utility/csv_export.py +++ b/src/registrar/utility/csv_export.py @@ -746,7 +746,6 @@ class DomainDataFull(DomainExport): return Q( domain__state__in=[ Domain.State.READY, - Domain.State.DNS_NEEDED, Domain.State.ON_HOLD, ], ) @@ -842,7 +841,6 @@ class DomainDataFederal(DomainExport): organization_type__icontains="federal", domain__state__in=[ Domain.State.READY, - Domain.State.DNS_NEEDED, Domain.State.ON_HOLD, ], ) From 8a24194a545a38e6c9d232a3dd0920bd4cd1e684 Mon Sep 17 00:00:00 2001 From: asaki222 Date: Mon, 28 Oct 2024 11:13:37 -0400 Subject: [PATCH 08/12] adjusted to portfolio check instead of organization feature flag --- src/registrar/templates/domain_request_dotgov_domain.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/registrar/templates/domain_request_dotgov_domain.html b/src/registrar/templates/domain_request_dotgov_domain.html index 9765edb11..18e04f305 100644 --- a/src/registrar/templates/domain_request_dotgov_domain.html +++ b/src/registrar/templates/domain_request_dotgov_domain.html @@ -6,7 +6,7 @@
    • Be available
    • Relate to your organization’s name, location, and/or services
    • - {% if has_organization_feature_flag %} + {% if portfolio %}
    • Be clear to the general public. Your domain name must not be easily confused with other organizations.
    • {% else %}
    • Be unlikely to mislead or confuse the general public (even if your domain is only intended for a specific audience)
    • @@ -23,7 +23,7 @@

      Note that only federal agencies can request generic terms like vote.gov.

      - {% if not has_organization_feature_flag%} + {% if not portfolio %}

      Domain examples for your type of organization

      {% include "includes/domain_example.html" %} From d23c5d15df90fabffc9dc2340c3a0d363775a77d Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Mon, 28 Oct 2024 10:42:46 -0600 Subject: [PATCH 09/12] update fields --- ...135_alter_federalagency_agency_and_more.py | 30 +++++++++++++++++++ src/registrar/models/federal_agency.py | 6 ++-- 2 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 src/registrar/migrations/0135_alter_federalagency_agency_and_more.py diff --git a/src/registrar/migrations/0135_alter_federalagency_agency_and_more.py b/src/registrar/migrations/0135_alter_federalagency_agency_and_more.py new file mode 100644 index 000000000..bcf8398dc --- /dev/null +++ b/src/registrar/migrations/0135_alter_federalagency_agency_and_more.py @@ -0,0 +1,30 @@ +# Generated by Django 4.2.10 on 2024-10-28 16:39 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ( + "registrar", + "0134_rename_portfolio_additional_permissions_portfolioinvitation_additional_permissions_and_more", + ), + ] + + operations = [ + migrations.AlterField( + model_name="federalagency", + name="agency", + field=models.CharField(null=True, verbose_name="Federal agency"), + ), + migrations.AlterField( + model_name="federalagency", + name="federal_type", + field=models.CharField( + choices=[("executive", "Executive"), ("judicial", "Judicial"), ("legislative", "Legislative")], + max_length=20, + null=True, + ), + ), + ] diff --git a/src/registrar/models/federal_agency.py b/src/registrar/models/federal_agency.py index aeeebac8c..19502e861 100644 --- a/src/registrar/models/federal_agency.py +++ b/src/registrar/models/federal_agency.py @@ -13,15 +13,15 @@ class FederalAgency(TimeStampedModel): agency = models.CharField( null=True, - blank=True, - help_text="Federal agency", + blank=False, + verbose_name="Federal agency", ) federal_type = models.CharField( max_length=20, choices=BranchChoices.choices, null=True, - blank=True, + blank=False, ) acronym = models.CharField( From f0e7ad4a454f543af2a181ca8c13ced4622ba9ef Mon Sep 17 00:00:00 2001 From: matthewswspence Date: Mon, 28 Oct 2024 12:01:08 -0500 Subject: [PATCH 10/12] fix tests --- src/registrar/tests/test_reports.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/registrar/tests/test_reports.py b/src/registrar/tests/test_reports.py index eebb11422..b7f1653d3 100644 --- a/src/registrar/tests/test_reports.py +++ b/src/registrar/tests/test_reports.py @@ -89,7 +89,6 @@ class CsvReportsTest(MockDbForSharedTests): call("cdomain1.gov,Federal - Executive,World War I Centennial Commission,,,,(blank)\r\n"), call("adomain10.gov,Federal,Armed Forces Retirement Home,,,,(blank)\r\n"), call("ddomain3.gov,Federal,Armed Forces Retirement Home,,,,(blank)\r\n"), - call("adomain2.gov,Interstate,,,,,(blank)\r\n"), call("zdomain12.gov,Interstate,,,,,(blank)\r\n"), ] # We don't actually want to write anything for a test case, @@ -470,8 +469,6 @@ class ExportDataTest(MockDbForIndividualTests, MockEppLib): # Invoke setter self.domain_1.security_contact # Invoke setter - self.domain_2.security_contact - # Invoke setter self.domain_3.security_contact # Add a first ready date on the first domain. Leaving the others blank. self.domain_1.first_ready = get_default_start_date() @@ -492,7 +489,6 @@ class ExportDataTest(MockDbForIndividualTests, MockEppLib): "defaultsecurity.gov,Federal - Executive,World War I Centennial Commission,,,,(blank)\n" "adomain10.gov,Federal,Armed Forces Retirement Home,,,,(blank)\n" "ddomain3.gov,Federal,Armed Forces Retirement Home,,,,security@mail.gov\n" - "adomain2.gov,Interstate,,,,,(blank)\n" "zdomain12.gov,Interstate,,,,,(blank)\n" ) # Normalize line endings and remove commas, From 18ca5f70ae2f2952583b6aaa41eb63ccef3ecf3e Mon Sep 17 00:00:00 2001 From: matthewswspence Date: Tue, 29 Oct 2024 09:57:11 -0500 Subject: [PATCH 11/12] hardcode env vars --- .github/workflows/clone-staging.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/clone-staging.yaml b/.github/workflows/clone-staging.yaml index c82d1fa70..704d80b36 100644 --- a/.github/workflows/clone-staging.yaml +++ b/.github/workflows/clone-staging.yaml @@ -18,8 +18,8 @@ jobs: clone-database: runs-on: ubuntu-latest env: - CF_USERNAME: CF_${{ env.SOURCE_ENVIRONMENT }}_USERNAME - CF_PASSWORD: CF_${{ env.SOURCE_ENVIRONMENT }}_PASSWORD + CF_USERNAME: CF_MS_USERNAME + CF_PASSWORD: CF_STAGING_PASSWORD steps: - name: Checkout repository uses: actions/checkout@v3 From a1567cf235afc54ef4b1888d3faa5063f9a7e8be Mon Sep 17 00:00:00 2001 From: matthewswspence Date: Tue, 29 Oct 2024 10:16:39 -0500 Subject: [PATCH 12/12] fix minor bug in clone workflow --- .github/workflows/clone-staging.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/clone-staging.yaml b/.github/workflows/clone-staging.yaml index 704d80b36..2a6c33410 100644 --- a/.github/workflows/clone-staging.yaml +++ b/.github/workflows/clone-staging.yaml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest env: CF_USERNAME: CF_MS_USERNAME - CF_PASSWORD: CF_STAGING_PASSWORD + CF_PASSWORD: CF_MS_PASSWORD steps: - name: Checkout repository uses: actions/checkout@v3