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

Create Requesting Entity Page #2771

Closed
12 tasks done
CocoByte opened this issue Sep 18, 2024 · 6 comments · Fixed by #2973
Closed
12 tasks done

Create Requesting Entity Page #2771

CocoByte opened this issue Sep 18, 2024 · 6 comments · Fixed by #2973
Assignees
Labels
dev issue is for the dev team Feature: 🏢 Org Model

Comments

@CocoByte
Copy link
Contributor

CocoByte commented Sep 18, 2024

Issue description

The introduction of suborganizations means users need a way to specify whether their domain request belongs to the portfolio or a suborg. The solution for this is to create a "Requesting Entity" section in the domain request flow, which allows the user to make this specification.

This Requesting entity feature consists of the following parts;

  • The Requesting Entity step matches the figma
  • A “Requesting Entity” section is added to the following areas;
    • “Review and Submit” page
    • E-mails for Portfolio Domain Requests
  • Update the Admin Readonly view for Portfolio Domain Request (Specifically, do not show the city and state fields if the user is selecting a suborganization from the list. Display the city/state/requested suborg fields when the user selects the "Other" option. Reference this annotation.)

Acceptance criteria

  • The Requesting entity page matches the figma for all verbage and formatting/appearance
  • For a brand new request form, both radio buttons are unselected by default
  • Selecting a radio button updates the page according to the figma annotations
  • The Requesting entity step in the side nav locks and unlocks just like the other steps in our regular Domain Request flow (Editing an in-progress Portfolio Domain Request that already had Requesting Entity data will load the request form with the Requesting Entity step unlocked.)
  • Required fields are flagged as required and follow the same default error handling message format as other required fields in our regular Domain Request flow
  • The "Review and Submit" page has a "Requesting Entity" section as shown in the figma, with data updated accordingly
  • all form errors have proper wording following our normal conventions (such as don't say "this field is required")
  • E-mails for Portfolio Request has a "Requesting Entity" section, with data updated accordingly
  • Add the fields requested_suborganization, suborganization_city and suborganization_state to the domain request object, (do not confuse organization city/state with the requested suborganization city and state)
  • As these are new fields added to a domain request, make sure on approval they are copied to domain info. Be sure to note the below ACs.
  • The Admin Readonly view for Portfolio Request, Domain info/Domain does not show the requested suborganization, suborg_city and state fields if the user is selecting a suborganization from the list. But it displays the requested suborganization, city/state fields when the user selects the "Other" option. Reference this annotation
  • Requested Suborganization/ suborganization city and suborganization_state never show on non-portfolio domain requests.

Additional context

The previous ticket #2760 added a placeholder requesting entity page that you can use here.

Links to other issues

@h-m-f-t
Copy link
Member

h-m-f-t commented Sep 30, 2024

Moved to backlog. Just need to be pointed and this can be marked Ready, cc: @abroddrick.

(The title does still say DRAFT. Can that be removed?)

@abroddrick abroddrick changed the title (DRAFT) Create Requesting Entity Page Create Requesting Entity Page Oct 11, 2024
@abroddrick abroddrick removed their assignment Oct 11, 2024
@abroddrick
Copy link
Contributor

Removed draft, edited content, and removed myself as it appears refined.

@vickyszuchin
Copy link

Based on @abroddrick last comment status of ticket, I am moving this ticket to "Ready".

@vickyszuchin vickyszuchin moved this from 🍦 Backlog to 🎯 Ready in .gov Product Board Oct 15, 2024
@vickyszuchin vickyszuchin moved this from 🎯 Ready to 🔖 Planned in .gov Product Board Oct 16, 2024
@zandercymatics zandercymatics moved this from 🔖 Planned to 🏗 In progress in .gov Product Board Oct 22, 2024
@zandercymatics
Copy link
Contributor

@CocoByte / @abroddrick See image below. Since this ticket is adding new city, org name, etc fields - do we have a ticket that'll update the csvs?

Image

@zandercymatics
Copy link
Contributor

zandercymatics commented Oct 24, 2024

@abroddrick / @CocoByte The AC "...on admin, hide fields when the user selects the "Other" option. Reference this annotation" links to an annotation that seems to refer to the form on the main page itself rather than Django admin.

Regarding django admin specifically, it is difficult to do this without actually adding a dummy "other" record in the DB which I think we should avoid. I could of course inject an "other" option using javascript under certain conditions, but I think that might get overly engineered.
Is this a hard requirement or could it be flexible in that these fields just appear when nothing is selected for suborg? Or perhaps as a details dropdown?

@CocoByte
Copy link
Contributor Author

CocoByte commented Oct 24, 2024

An idea...

  1. Inject "other" into the "choices=" part of your dropdown definition in the form class.
    class YourForm(forms.Form):
    suborganization_names = forms.ChoiceField(
    choices=[
    ...(existing names)...
    ('other', 'Other (Enter the name of your organization manually)'),
    ]
    )

  2. Add javascript to toggle the hidden part of the form when "other" is selected.

I've had to upgrade our form "section toggling magic" in my last PR...so maybe take a look at that first to see where I'm coming from.

@zandercymatics zandercymatics moved this from 🏗 In progress to 👀 In review in .gov Product Board Oct 25, 2024
zandercymatics added a commit that referenced this issue Nov 1, 2024
…y-page

#2771 + #3015: Create requesting entity page - [MEOWARD]
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in .gov Product Board Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev issue is for the dev team Feature: 🏢 Org Model
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

5 participants