Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#2852: property to portfolio related fields - [AD] #3005

Merged
merged 58 commits into from
Nov 7, 2024

Conversation

asaki222
Copy link
Contributor

@asaki222 asaki222 commented Oct 28, 2024

Ticket

Resolves #2852

Changes

  • Added @Property methods to DomainRequest model for the following fields:

    • organization_name
    • generic_org_type (called "organization_type" in Portfolio)
    • federal_agency
    • federal_type
    • city
    • state_territory
    • urbanization
    • senior_official
  • Changes to the domain request admin table

    • the fields above now have the 'converted' prefix in the domain request admin table, and the information should be pulled from portfolio, not the domain request model.
    • on the domain requests table in the non admin view, you should click on the csv report. And that report should have info pulled info from the fields above from Portfolio, and not the domain request model.

Context for reviewers

Setup

Code Review Verification Steps

As the original developer, I have

Satisfied acceptance criteria and met development standards

  • Met the acceptance criteria, or will meet them in a subsequent PR
  • Created/modified automated tests
  • Update documentation in READMEs and/or onboarding guide

Ensured code standards are met (Original Developer)

  • If any updated dependencies on Pipfile, also update dependencies in requirements.txt.
  • Interactions with external systems are wrapped in try/except
  • Error handling exists for unusual or missing values

Validated user-facing changes (if applicable)

  • Tag @dotgov-designers in this PR's Reviewers for design review. If code is not user-facing, delete design reviewer checklist
  • Verify new pages have been added to .pa11yci file so that they will be tested with our automated accessibility testing
  • Checked keyboard navigability
  • Tested general usability, landmarks, page header structure, and links with a screen reader (such as Voiceover or ANDI)

As a code reviewer, I have

Reviewed, tested, and left feedback about the changes

  • Pulled this branch locally and tested it
  • Verified code meets all checks above. Address any checks that are not satisfied
  • Reviewed this code and left comments. Indicate if comments must be addressed before code is merged
  • Checked that all code is adequately covered by tests
  • Verify migrations are valid and do not conflict with existing migrations

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.

  • New pages have been added to .pa11yci file so that they will be tested with our automated accessibility testing
  • Checked keyboard navigability
  • Meets all designs and user flows provided by design/product
  • Tested general usability, landmarks, page header structure, and links with a screen reader (such as Voiceover or ANDI)
  • (Rarely needed) Tested as both an analyst and applicant user

As a designer reviewer, I have

Verified that the changes match the design intention

  • Checked that the design translated visually
  • Checked behavior. Comment any found issues or broken flows.
  • Checked different states (empty, one, some, error)
  • Checked for landmarks, page heading structure, and links

Validated user-facing changes as a designer

  • Checked keyboard navigability
  • Tested general usability, landmarks, page header structure, and links with a screen reader (such as Voiceover or ANDI)
  • Tested with multiple browsers (check off which ones were used)
    • Chrome
    • Microsoft Edge
    • FireFox
    • Safari
  • (Rarely needed) Tested as both an analyst and applicant user

References

Screenshots

@asaki222 asaki222 requested a review from abroddrick as a code owner October 28, 2024 23:34
Copy link

github-actions bot commented Nov 5, 2024

🥳 Successfully deployed to developer sandbox ad.

Copy link

github-actions bot commented Nov 5, 2024

🥳 Successfully deployed to developer sandbox ad.

@asaki222 asaki222 changed the title [Draft] - #2852: property to portfolio related fields - [AD] #2852: property to portfolio related fields - [AD] Nov 5, 2024
Copy link

github-actions bot commented Nov 5, 2024

🥳 Successfully deployed to developer sandbox ad.

@asaki222 asaki222 changed the title #2852: property to portfolio related fields - [AD] [DRAFT] - #2852: property to portfolio related fields - [AD] Nov 6, 2024
@asaki222 asaki222 changed the title [DRAFT] - #2852: property to portfolio related fields - [AD] #2852: property to portfolio related fields - [AD] Nov 6, 2024
Copy link

github-actions bot commented Nov 6, 2024

🥳 Successfully deployed to developer sandbox ad.

Copy link

github-actions bot commented Nov 6, 2024

🥳 Successfully deployed to developer sandbox ad.

Copy link

github-actions bot commented Nov 6, 2024

🥳 Successfully deployed to developer sandbox ad.

Copy link
Contributor

@CocoByte CocoByte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking:
The admin table filters (for generic_org_type) has not been updated. If we are not doing this as part of this ticket, let me know and I can approve. @abroddrick (tagging for verification)

(Maybe) Blocking:
Also, do we want the column headers to include "converted" in the title? Or should we keep them the same as before, even though we are pulling from portfolio.

@@ -1852,7 +1876,7 @@ def status_history(self, obj):

# Read only that we'll leverage for CISA Analysts
analyst_readonly_fields = [
"federal_agency",
"converted_federal_agency",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my understanding, we are stripping out all the ACs involving change forms. Revert to federal_agency.

Copy link

github-actions bot commented Nov 7, 2024

🥳 Successfully deployed to developer sandbox ad.

@asaki222 asaki222 requested a review from CocoByte November 7, 2024 20:25
Copy link
Contributor

@CocoByte CocoByte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple minor changes still.

class GenericOrgFilter(admin.SimpleListFilter):
"""Custom Generic Organization filter that accomodates portfolio feature.
If we have a portfolio, use the portfolio's organization. If not, use the
organization in the Domain Information object."""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update this comment to "Domain Request" object

"custom_election_board",
"city",
"state_territory",
"converted_generic_org_type",
Copy link
Contributor

@CocoByte CocoByte Nov 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still don't see updates for the column headers. Did we decide against it?

@admin.display(description=_("State/Territory"))
def converted_state_territory(self, obj):
return obj.converted_state_territory

# Columns
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CocoByte these are the admin.display methods.

@CocoByte CocoByte self-requested a review November 7, 2024 21:22
Copy link
Contributor

@CocoByte CocoByte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, LGTM

Copy link

github-actions bot commented Nov 7, 2024

🥳 Successfully deployed to developer sandbox ad.

@asaki222 asaki222 merged commit 8a973a6 into main Nov 7, 2024
10 checks passed
@asaki222 asaki222 deleted the ad/2852-property-to-portfolio-related-fields branch November 7, 2024 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add @property to portfolio related fields in Domain Requests
4 participants