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

Dev: Send emails when someone is added as a domain manager #2370

Open
11 tasks
Tracked by #3296
Katherine-Osos opened this issue Jun 25, 2024 · 15 comments
Open
11 tasks
Tracked by #3296

Dev: Send emails when someone is added as a domain manager #2370

Katherine-Osos opened this issue Jun 25, 2024 · 15 comments
Assignees
Labels
🔔 Notifications related to notification (email) sent to users bundled Parent ticket will be sprinted and this ticket is included in the parent dev issue is for the dev team Feature: 🏢 Org Model refinement

Comments

@Katherine-Osos
Copy link
Contributor

Katherine-Osos commented Jun 25, 2024

Story

As a domain manager
I want to know when managers have been added to my domains
so that I'm aware who has access to those domains.

Acceptance Criteria

  • This new Email is sent to all managers of a domain when someone is invited to manage the domain.
    • Registrar: This new email should be sent if the person was invited via the registrar
      • Note: we send invites in the registrar from 1) Member management- domain assignment flow and 2) the Domain pages under Domain Managers. Both should be included.
      • Note: This applies when someone is added to a domain via the registrar but they are not yet a user in our system (aka a _domain invitatio_n is made) AND it also applies when someone is added to a domain via the registrar while being an existing user- aka a UserDomainRole is created
    • Django admin: This new email should be sent if the person was invited via the django admin DomainInvitation table.
  • this email applies to org model and non org model equally

Add static messaging in Django:

  • Add a static message to the top of the "Add Domain invitation" page that reads: "If you add someone to a domain here, it will trigger emails to the invitee and all managers of the domain when you click "save." If you don't want to trigger those emails, use the User domain roles permissions table instead."
    • Link to the "User Domain Roles" table in that message.
  • Add a static message to the top of the "Add user domain role" page that reads: "If you add someone to a domain here, it won't trigger any emails. To trigger emails, use the User Domain Role invitations table instead."
    • Link to the "Portfolio invitations" table in that message.
  • Use slim blue alert, placed right below the heading on the "add" page for those tables.

Additional Context

  • This issue is about providing user notifications. It might seem like m5 is the wrong place, since m7 is about notifications – but from a product perspective, we want this in m5 so that members can actually be managed and get notifications about changes.
  • There was some chatter in this issue you can see in the edit history. I've moved it down below.

Issue Links

@vickyszuchin
Copy link

Refinement label added because of comment in "Additional Context" section.

@vickyszuchin
Copy link

Discussed and refined in Discovery Fireside meeting (9/5).

@vickyszuchin
Copy link

Additional refinement questions added.

@h-m-f-t
Copy link
Member

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

@Katherine-Osos and @witha-c to answer the questions and help us decide next steps.

@witha-c
Copy link

witha-c commented Sep 26, 2024

@Katherine-Osos and @witha-c to answer the questions and help us decide next steps.

Done! Ready to be split into new tickets OR reviewed by product for agreement with our recommendations and then split.

@PaulKuykendall
Copy link

@abroddrick will make the precursor ticket to "Make the checkbox to disable email sending."

@h-m-f-t
Copy link
Member

h-m-f-t commented Oct 7, 2024

Some content was in the initial comment in this issue, but I'm re-homing it here for history's sake. It doesn't need to be reviewed as part of this issue.

A long comment

-(resolved) For Org Model, someone could be added to (or removed from) dozens of domains via the "Members" page. Is it ok that dozens of emails could be sent to the same people?
answer: this ticket only applies to the Domain management page, changes that occur on the members page will be handled differently. See #2621 as this is being developed. Also see more details here if want more info on what is sent when

implementation note:
who invited the user should come from the audit logs. For a visual, look at django admin, and pick any domain invitation. Click history and you can see that audit logs store the user who made the domain invitation. The same goes for User domain role. It may be worth having a utility function that can be used to find the user who created a given record.

Refinement Question:

  • We don't currently send an email if someone creates a domain invitation on stable for a user. If we send a domain invitation email for each domain invitation made in django admin, do you want us to update the the success message or add any info to let a user know that they will be sending a email by performing this action? Same goes for the deleting a User domain role (aka removing a user from a domain on django admin)

    • Design recommendation: We should add a checkbox to the "add domain invitation" page in the admin that allows users to decide whether an email gets sent. This checkbox should be checked by default, meaning emails will be sent to the invitee and domain managers. However, if the box is unchecked by the user, then no emails will be sent. This should cover the messaging and inform the user of the action about to take place.
  • There have been times when Cameron has had to make multiple domain invitations for a user, this will now send an email for each domain invitation manually created in admin. Do we want to instead give the analyst/superuser an option to send the email or not? Or are we okay that an analyst/superuser who makes multiple domains invitations in a short time span will end up sending multiple emails to a user.

    • Design recommendation: There is security in transparency and communication. Sending an email for each action should be the default. Our recommendation above to add a checkbox will allow analysts and superusers to choose to not send an email if there is a compelling reason.
  • For removing a domain manager, if there is an error with the merge users feature we would need to manually remove a user with a deleted loging.gov account via django admin. This would result in an email for each domain they are removed from. Then when they are re-added they will get an email for each domain sent to their new emails address inviting them to those domains. Has design/product considered that with this AC?

    • Design recommendation: This is an example of a compelling reason to avoid all the emails. The checkbox will allow analysts and superusers to skip the email notifications for administrative moves like this.
  • For indicating the email of who sent the domain invitation, what if it someone on django admin sending the domain invitation? Should we use [email protected] as the email? (Assuming we don't want to show analyst emails if they make an invitation)

@katypies
Copy link
Contributor

katypies commented Dec 9, 2024

I think we still need a ticket to allow analysts to not send an email when a domain manager is invited. @lizpearl is going to create that ticket.

Since this is assigned to @abroddrick , there may be additional refinement needed, but we're not entirely sure what's missing, so need to get that documented and resolved with Alysia.

@h-m-f-t
Copy link
Member

h-m-f-t commented Dec 10, 2024

@katypies analysts can avoid sending an email by adding a user domain role directly, though I'm unsure where org model requests intersect with that.

@abroddrick
Copy link
Contributor

@katypies the todo item I have for this ticket was to create a ticket for adding checkboxes so that analysts can turn this off if they want. That was going to block this one in particular. See Paul's comment here: #2370 (comment).

@Katherine-Osos
Copy link
Contributor Author

@abroddrick Instead of checkboxes, we discussed a different approach when working on another ticket. Let's chat -- we can update this ticket together if that's helpful.

@abroddrick abroddrick changed the title Dev: Send emails when someone is added / removed as a domain manager Dev: Send emails when someone is removed as a domain manager Jan 1, 2025
@abroddrick abroddrick changed the title Dev: Send emails when someone is removed as a domain manager Dev: Send emails when someone is added as a domain manager Jan 1, 2025
@abroddrick
Copy link
Contributor

Per our convo today, @Katherine-Osos I updated this one and created a separate ticket for the manager removal email . Please double check my attempt at the info messages. Leaving refinement on this for people to review the changes if needed.

Also, Katherine (or anyone else) If the user is not part of a portfolio yet, and they are invited to a domain in a portfolio should we send a portfolio invitation? This becomes potentially problematic as we are creating portfolios for FEB without them all being used. Which means if we did this (add a user to the portfolio too), they could get an invite to that portfolio and then not be able to see the portfolio when they log in. I would recommend against us inviting them to the portfolio too and instead we adjust the info message to indicate that the user will not be added to the portfolio.

@abroddrick abroddrick removed their assignment Jan 1, 2025
@Katherine-Osos
Copy link
Contributor Author

@abroddrick I updated the description and added an AC for Django admin. In addition to this new email for existing domain managers, Django should also send the existing "domain invitation" email to the person who is being added as a manager. Take a look at the updated ACs and see if you're ok with that change.

@Katherine-Osos
Copy link
Contributor Author

@abroddrick As for your second note about sending the portfolio invitation email ... if the domain is part of a portfolio, then the person needs to be added to the portfolio or the member data will be inaccurate for that organization. Maybe this is worth a discussion in Org Model meeting before working on this ticket. fyi, a similar AC is included in this ticket for updating the domain invitation email and this ticket for adding the portfolio invitation.

@abroddrick
Copy link
Contributor

Keeping refinement on this to discuss those tickets in the org model meeting. @Katherine-Osos I will update your changes to reflect discussions had regarding keeping the sending domain invitation email as a seperate AC away from the status email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔔 Notifications related to notification (email) sent to users bundled Parent ticket will be sprinted and this ticket is included in the parent dev issue is for the dev team Feature: 🏢 Org Model refinement
Projects
Status: 🍦 Backlog
Development

No branches or pull requests

9 participants