diff --git a/docs/developer/registry-access.md b/docs/developer/registry-access.md index 50caa4823..38162b52e 100644 --- a/docs/developer/registry-access.md +++ b/docs/developer/registry-access.md @@ -104,30 +104,34 @@ response = registry._client.transport.receive() This is helpful for debugging situations where epplib is not correctly or fully parsing the XML returned from the registry. -### Adding in a expiring soon domain -The below scenario is if you are NOT in org model mode (`organization_feature` waffle flag is off). +### Adding in an 'expiring soon' or 'expired' domain + +#### Overview +Expiration dates created by fixtures in sandboxes are not accurate (it resets to the expiration date to a year from 'today'). +In order to view an expiring or expired domain, we need to pull a record from staging and use it on the desired sandbox. In order to have edit ability, you must be a domain manager of that domain. Below are instructions on how to add a domain from staging sandbox into another sandbox and how to be able to view the domain. As a domain manager you will be able to view the renewal form. + +#### Find an expired or expiring domain record 1. Go to the `staging` sandbox and to `/admin` -2. Go to Domains and find a domain that is actually expired by sorting the Expiration Date column +2. Go to Domains and find a domain that is actually expired or expiring soon by sorting the Expiration Date column 3. Click into the domain to check the expiration date -4. Click into Manage Domain to double check the expiration date as well +4. Click into Manage Domain to double check the expiration date as well (this expiration date is the source of truth) 5. Now hold onto that domain name, and save it for the command below +#### Duplicate the domain into your sandbox environment of choice and assign to manager and portfolio + 6. In a terminal, run these commands: ``` -cf ssh getgov- +cf ssh getgov- /tmp/lifecycle/shell ./manage.py shell -from registrar.models import Domain, DomainInvitation -from registrar.models import User -user = User.objects.filter(first_name="") +from registrar.models import Domain domain = Domain.objects.get_or_create(name="") ``` -7. Go back to `/admin` and create Domain Information for that domain you just added in via the terminal -8. Go to Domain to find it -9. Click Manage Domain -10. Add yourself as domain manager -11. Go to the Registrar page and you should now see the expiring domain +7. From `/admin` in your sandbox environment, locate the Domain record page of the domain you just created. In Domain Information, add a "creator" and "portfolio" for the org model. Note: To view the domain in the org model, it must be associated with a portfolio and viewed from within that portfolio. +9. Click Manage Domain which will take you to the app +10. In the Domain Managers section, add yourself as domain manager (Alternatively, you can assign yourself as a Domain Manager in `/admin`. Go to the User domain roles model, click the "Add user domain role +" button, and then add yourself to the domain as a manager.) +11. You should now be able to access your expiring domain in the registrar. + -If you want to be in the org model mode, turn the `organization_feature` waffle flag on, and add that domain via Django Admin to a portfolio to be able to view it. \ No newline at end of file diff --git a/src/registrar/views/domain.py b/src/registrar/views/domain.py index c4ae2137b..b9daf15f9 100644 --- a/src/registrar/views/domain.py +++ b/src/registrar/views/domain.py @@ -386,7 +386,7 @@ class DomainFormBaseView(DomainBaseView, FormMixin): @grant_access(IS_DOMAIN_MANAGER, IS_STAFF_MANAGING_DOMAIN, HAS_PORTFOLIO_DOMAINS_VIEW_ALL) class DomainView(DomainBaseView): - """Domain detail overview page.""" + """Domain detail overview page""" template_name = "domain_detail.html"