Skip to content

Conversation

@Ostap-Zherebetskyi
Copy link
Collaborator

@Ostap-Zherebetskyi Ostap-Zherebetskyi commented Jan 8, 2026

Ticket

https://openscience.atlassian.net/browse/ENG-9854
https://openscience.atlassian.net/browse/ENG-10025
https://openscience.atlassian.net/browse/ENG-10040
https://openscience.atlassian.net/browse/ENG-10095

Purpose

  • NR Post-release model migration
  • NR Post-release bug-fixes that requires migration

Changes

  • Duplicate notifications: add constraints to prevent duplicates
  • Add/Tweak status for email tasks (e.g. partially success, auto-fixed, etc.)
  • Distinguish between none-frequency sent and actual sent
  • Move no_login_email_check to user model
  • Remove seen field from Notification

Side Effects

N/A

QE Notes

N/A

CE Notes

N/A

Documentation

N/A

@Ostap-Zherebetskyi Ostap-Zherebetskyi force-pushed the hotfix/NR_model_migration branch from e72dbb2 to 1d70ead Compare January 8, 2026 13:04
@Ostap-Zherebetskyi Ostap-Zherebetskyi marked this pull request as ready for review January 8, 2026 13:32
@Ostap-Zherebetskyi Ostap-Zherebetskyi changed the title [ENG-9854][ENG-10025][ENG-10039][ENG-10040] NR model migration [ENG-9854][ENG-10025][ENG-10039][ENG-10040][ENG-10024] NR model migration Jan 8, 2026
@Ostap-Zherebetskyi Ostap-Zherebetskyi force-pushed the hotfix/NR_model_migration branch from 1d70ead to 724cdda Compare January 8, 2026 13:49
Copy link
Collaborator

@cslzchen cslzchen left a comment

Choose a reason for hiding this comment

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

LGTM ⭐

Note: let's take out three hotfix pieces and make a different PR, and I will re-target this PR to feature/notifications-refactor-post-release once 26.1.5 is released.

@cslzchen cslzchen changed the title [ENG-9854][ENG-10025][ENG-10039][ENG-10040][ENG-10024] NR model migration [ENG-9854][ENG-10025][ENG-10040] NR Post-release model migration Jan 8, 2026
@cslzchen cslzchen changed the title [ENG-9854][ENG-10025][ENG-10040] NR Post-release model migration [ENG-9854][ENG-10025][ENG-10040] NR Post-release model migration + model dependent bug-fixes Jan 8, 2026
@Ostap-Zherebetskyi Ostap-Zherebetskyi force-pushed the hotfix/NR_model_migration branch from 48ed72a to ab06f57 Compare January 21, 2026 10:46
@Ostap-Zherebetskyi Ostap-Zherebetskyi changed the base branch from hotfix/26.1.5 to feature/notifications-refactor-post-release January 21, 2026 10:46
@cslzchen cslzchen changed the title [ENG-9854][ENG-10025][ENG-10040] NR Post-release model migration + model dependent bug-fixes [ENG-9854][ENG-10025][ENG-10040][ENG-10095] NR Post-release model migration + model dependent bug-fixes Jan 27, 2026
Copy link
Collaborator

@cslzchen cslzchen left a comment

Choose a reason for hiding this comment

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

Looks good with a few comments. I will take care of a few and leave the rest (if they make sense) for the future PR.

In addition, I will rename the migration name to 0036_notification_refactor_post_release

return base_q.annotate(_has_task=Exists(existing_no_login)).filter(_has_task=False)
# Exclude users who have already received a no-login email recently
return base_q.filter(
Q(no_login_email_last_sent__isnull=True) |
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since the new check only checks the user field, we need a script to migrate all sent ones to the user model before we clean them up.

@cslzchen cslzchen merged commit f6694d8 into CenterForOpenScience:feature/notifications-refactor-post-release Jan 28, 2026
15 of 16 checks passed
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