carpentries / amy

A web-based workshop administration application built using Django.
https://amy.carpentries.org
MIT License
109 stars 72 forks source link

Scheduled/completed emails should be visible from the related object #2622

Closed maneesha closed 2 months ago

maneesha commented 3 months ago

For example, this membership onboarding email should be visible from this related membership object.

We would want to do this when the related object is a membership or an event. We may not want to do this when the related object is a person.

maneesha commented 2 months ago

Copying in notes from duplicate issue #2627:

For events, memberships, and persons, admins should see all associated scheduled/completed/failed emails in that object's view. For example, for a "post workshop email" that email should be listed in the event view and the person view for each person receiving that email.

For persons, the person should not see those emails in their own view. Currently other objects (event, membership) can not be viewed by a non-admin user but the same constraint should be in place.

pbanaszkiewicz commented 2 months ago

@maneesha As far as I know, non-admin users don't have access to administrative pages for persons. Please correct me if I'm wrong.

pbanaszkiewicz commented 2 months ago

@maneesha I added the display of related scheduled emails to following models:

There are models used as related to the scheduled emails, but we have no place to display the list of scheduled emails:

@maneesha let me know if you want to add that list of related scheduled emails to any of those 2 remaining models, you can also tell me where you want that list displayed.

maneesha commented 2 months ago

I think my language above came out confusing. A non-admin user can not view any pages other than their own Person profile. Emails should not show in their own Person view.

Emails should show in all admin views.

maneesha commented 2 months ago

For the remaining two models:

maneesha commented 2 months ago

Would it be difficult to have all emails sent to a Person display on that Person's admin view?

pbanaszkiewicz commented 2 months ago

Would it be difficult to have all emails sent to a Person display on that Person's admin view?

Currently yes, but we could make it an enhancement for v4.4.

pbanaszkiewicz commented 2 months ago

@maneesha For the instructor recruitment signups this is going to be the view; I used the table since email is per signup, not per whole recruitment.

image image

It does make the table cramped, so if you prefer another way of displaying it, eg. separate table underneath that table, let me know.

pbanaszkiewicz commented 2 months ago

@maneesha Similarly for awards I had to create a separate list there:

image
maneesha commented 2 months ago

All looks good! For the Instructor signups - this would end up being a bulleted list, where we would see an additional email when the Instructor is confirmed/denied, right? Also would there ever be a case where there was no related email?

pbanaszkiewicz commented 2 months ago

@maneesha

For the Instructor signups - this would end up being a bulleted list, where we would see an additional email when the Instructor is confirmed/denied, right?

Yes. Here's an example - instructor Kelly Hall was first confirmed, then declined and we can see both emails:

image

Also would there ever be a case where there was no related email?

I don't think so. It's possible with my fake data, but in reality we have covered these actions:

  1. admin signs instructor up for a workshop (on their behalf)
  2. instructor signs up for a workshop (themself)
  3. instructor is confirmed to teach at a workshop
  4. instructor is declined from teaching at a workshop

If you're asking "would there be a scheduled email without related object" this is not possible currently. All scheduled emails will have a related object, however it's always 1 object. This could be improved in future so that we can easily track e.g. all emails a specific user was involved with or all emails concerning one event. I think I suggested to you that this could be non-MVP improvement for v4.4.