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

for MPP-3567: add last_engagement field to Profile model #4277

Merged
merged 3 commits into from
Jan 9, 2024

Conversation

groovecoder
Copy link
Member

@groovecoder groovecoder commented Jan 3, 2024

New Profile.last_engagement DateTime field

For MPP-3567, we need to update the database to measure new engagement actions. This PR adds a new last_engagement field to the Profile model, and updates it each time one of the new engagement actions happens:

  1. When a RelayAddress is deleted
  2. When a DomainAddress is deleted
  3. When a RelayAddress is added
  4. When a DomainAddress is added
  5. When an email is blocked
  6. When an email is forwarded
  7. When a reply is sent

How to test

Checklist (Definition of Done)

  • Product Owner accepted the User Story (demo of functionality completed) or waived the privilege.
  • All acceptance criteria are met.
  • Jira ticket has been updated (if needed) to match changes made during the development process.
  • I've added or updated relevant docs in the docs/ directory
  • Jira ticket has been updated (if needed) with suggestions for QA when this PR is deployed to stage.
  • All UI revisions follow the coding standards, and use Protocol tokens where applicable (see /frontend/src/styles/tokens.scss).
  • Commits in this PR are minimal and have descriptive commit messages.
  • l10n changes have been submitted to the l10n repository, if any.

@groovecoder groovecoder force-pushed the add-last_engagement-field-mpp-3567 branch from b22b424 to 1a83021 Compare January 4, 2024 15:28
@groovecoder groovecoder changed the title wip for MPP-3567: add last_engagement field to Profile model Jan 4, 2024
Update the field with datetime.now() for each engagement action.
@groovecoder groovecoder force-pushed the add-last_engagement-field-mpp-3567 branch from 1a83021 to 24cad80 Compare January 4, 2024 16:47
@groovecoder groovecoder force-pushed the add-last_engagement-field-mpp-3567 branch from ff6e037 to e93d705 Compare January 8, 2024 19:03
@groovecoder groovecoder marked this pull request as ready for review January 8, 2024 19:13
@jwhitlock jwhitlock self-requested a review January 8, 2024 19:45
Copy link
Member

@jwhitlock jwhitlock left a comment

Choose a reason for hiding this comment

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

Thanks @groovecoder! This looks good, no suggested code changes, but some questions about the design and some nits.

emails/models.py Show resolved Hide resolved
emails/models.py Show resolved Hide resolved
emails/models.py Outdated Show resolved Hide resolved
emails/models.py Outdated Show resolved Hide resolved
emails/tests/views_tests.py Outdated Show resolved Hide resolved
emails/tests/views_tests.py Outdated Show resolved Hide resolved
emails/tests/views_tests.py Outdated Show resolved Hide resolved
emails/tests/views_tests.py Outdated Show resolved Hide resolved
emails/tests/views_tests.py Outdated Show resolved Hide resolved
@groovecoder
Copy link
Member Author

Questions answered; nits addressed.

@jwhitlock jwhitlock added this pull request to the merge queue Jan 9, 2024
Merged via the queue into main with commit 9936088 Jan 9, 2024
23 checks passed
@jwhitlock jwhitlock deleted the add-last_engagement-field-mpp-3567 branch January 9, 2024 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants