diff --git a/.github/workflows/clone-staging.yaml b/.github/workflows/clone-staging.yaml index ebb0a1a82..2a6c33410 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_MS_USERNAME + CF_PASSWORD: CF_MS_PASSWORD steps: - name: Checkout repository uses: actions/checkout@v3 - - name: Install Cloud Foundry CLI + - 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 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( diff --git a/src/registrar/templates/domain_request_dotgov_domain.html b/src/registrar/templates/domain_request_dotgov_domain.html index 764154254..18e04f305 100644 --- a/src/registrar/templates/domain_request_dotgov_domain.html +++ b/src/registrar/templates/domain_request_dotgov_domain.html @@ -6,7 +6,11 @@

@@ -19,11 +23,12 @@

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

- + {% if not portfolio %}

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 3b004354f..3c5b50d6b 100644 --- a/src/registrar/templates/portfolio_domain_request_additional_details.html +++ b/src/registrar/templates/portfolio_domain_request_additional_details.html @@ -7,14 +7,13 @@ {% block form_fields %} -
- +

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 %} 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, 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, ], )