#3618: script to update public contact org city state#4623
Conversation
|
🥳 Successfully deployed to developer sandbox cw. |
|
🥳 Successfully deployed to developer sandbox cw. |
|
🥳 Successfully deployed to developer sandbox cw. |
|
🥳 Successfully deployed to developer sandbox cw. |
|
🥳 Successfully deployed to developer sandbox cw. |
|
🥳 Successfully deployed to developer sandbox cw. |
|
🥳 Successfully deployed to developer sandbox cw. |
|
🥳 Successfully deployed to developer sandbox cw. |
|
🥳 Successfully deployed to developer sandbox cw. |
…ct values based on the same logic new registrants use
|
🥳 Successfully deployed to developer sandbox cw. |
|
🥳 Successfully deployed to developer sandbox cw. |
|
|
||
|
|
||
| class Command(BaseCommand): | ||
| help = "Updates registry disclose settings for PublicContact records to whatever the website currently computes." |
There was a problem hiding this comment.
Minor: recommend updating this to reflect new functionality when finished
|
🥳 Successfully deployed to developer sandbox cw. |
|
🥳 Successfully deployed to developer sandbox cw. |
|
🥳 Successfully deployed to developer sandbox cw. |
CocoByte
left a comment
There was a problem hiding this comment.
Nice work! Got a few questions (tired brain) -- and one small change request
Co-authored-by: CuriousX <nicolle.leclair@gmail.com>
|
🥳 Successfully deployed to developer sandbox cw. |
|
🥳 Successfully deployed to developer sandbox cw. |
|
🥳 Successfully deployed to developer sandbox cw. |
lizpearl
left a comment
There was a problem hiding this comment.
A couple of overall comments/questions:
- Is there a reason that the script includes contacts other than the registrant (like a scope change)? I think just dealing with registrant info would simplify the script.
- I noticed the queryset uses public contacts as the primary table to pull from. Just curious why it was used instead of domains.
- Since we're limiting this to registrants, we can prob just update if we're set to the default value
|
|
🥳 Successfully deployed to developer sandbox cw. |
There was a problem hiding this comment.
Approved - with one item to look at for logs (see comment) Functionally, script is working as expected.
Tested on -backup. Dry run info looks good. Might want to include more details for proposed contact values, but disclosure updates were easy to see.
Gotta admit it was a little painful to see that nice contact type argument go (per discussions we had today), but at least we know we can always reinstate it later if we want to run updates for other contacts. Thanks for being flexible on the script and the quick updates, @chaswick
| updated_contact.city = new_values["city"] | ||
| updated_contact.sp = new_values["state_territory"] | ||
| updated_contact.pc = new_values["zipcode"] | ||
| logger.info("Proposed new contact values: %s", updated_contact) |
There was a problem hiding this comment.
This just shows the contact id...did we want to show other values?
lizpearl
left a comment
There was a problem hiding this comment.
Looks good! I tested this on my sandbox which has some outdated staging value. I realized that there won't be much value running the whole test on staging because it will essentially create many orphaned contacts. Probably best to do selected domains in staging instead
Ticket
Resolves #3618
Changes
Registrantto actual registrant values #3580 in def _disclose_fields(self, contact:PublicContact) to set the epp disclosure settings per our requirements.Context for reviewers
Setup
This is a python django management command (https://docs.djangoproject.com/en/6.0/ref/django-admin/) and can be run from the sandbox environment where it is deployed using the cf login process defined in the Master Engineering Document -> Development -> Sandboxes section.
The basic run command is 'python manage.py update_public_contact_disclosure_settings'. Running this will print helpful instructions for the required option parameters.
Note that to make actual changes --no-dry-run must be passed. An example would be:
python manage.py update_public_contact_disclosure_settings --target-domain charlie-example.gov --no-dry-runMake sure to respond to the prompt.Registrantto actual registrant values #3580 for discussion and implementation of requirements).Registrant public contact types contain proper disclosure fields. Refer to 3580 for specifics.
Registrant public contact types contain proper disclosure fields. Refer to 3580 for specifics.
You will have to use the cf ote registry to verify these updates were carried out, and the manage.get.gov sandbox to verify the setup and relationships of the data.
Code Review Verification Steps
As the original developer, I have
Satisfied acceptance criteria and met development standards
Ensured code standards are met (Original Developer)
Validated user-facing changes (if applicable)
As a code reviewer, I have
Reviewed, tested, and left feedback about the changes
Validated user-facing changes as a developer
Note: Multiple code reviewers can share the checklists above, a second reviewer should not make a duplicate checklist. All checks should be checked before approving, even those labeled N/A.
As a designer reviewer, I have
Verified that the changes match the design intention
Validated user-facing changes as a designer
References
Screenshots