Commit 31048c7
[ENG-10538] Post-NR Project PR (#11623)
* Create global_file_updated and global_reviews subscriptions if missing
* Use USER_FILE_UPDATED for group global_file_updated
* Use REVIEWS_SUBMISSION_STATUS for group global_reviews
* Add missing `is_digest=True` for new OSF user subscriptions
* Extend otf subscription creation to apply to _node_file_updated group
* Fix typo for `_is_digest`
* add is_digest_type property
* Add is_digest_type property to NotificationType and log message in emit method
* Fix is_digest handling in NotificationType.emit method
* Log message update in NotificationType.emit method for is_digest handling
* fix unit tests
* Move set-deafult-subscriptions out of non-effective try-except
* Add fake_sent field to Notification model and update notification creation logic
* add unique_together constraint
* Add 'PARTIAL_SUCCESS' status to EmailTask model and update email task handling logic
* NR migration [ENG-10040, ENG-10025, ENG-9854]
* Remove subscription if notifications.tasks.send_moderator_email_task fails with permission error
* Apply suggestion from @Ostap-Zherebetskyi
* remove datetime
* Add 'no_login_email_last_sent' field to OSFUser and update email task logic
* Enforce and improve permission check for subscriptions
* Fix typo in annotated_obj_qs for NODE_FILE_UPDATED
* Add unit tests for testing node_file_updated subscription detail
* Implement notifications cleanup task and related settings; add tests for functionality
* Fix legacy subscription ID for NODE_FILE_UPDATED: "guid_files_updated"
* Fix duplicate and mismatched type NODE_FILE(S)_UPDATED
* removed email.py
* Fix annotated qs for global reviews and update unit tests
* Update tests for node_file(s)_updated subscription detail
* Rename fixtures for notification subscription detail tests
* Annotate with legacy_id for serializer to handle created subscriptions
* Add unit tests for creating missing subscriptions on the fly
* clear useless code
* Rename migration name for NR post-release
* Improve unit test: test_emit_frequency_none
* Remove `seen` from `Notification` and re-make migrations
* `mark_sent()` now handles `fake_sent=True`, and only `save()` once
* Update default settings
* remove useless import
* Enhance SubscriptionList queryset with additional content types and refactor notification type handling
* fix unit test
* Refactor SubscriptionList queryset to use a single provider content type and update related notification handling; add script to update notification subscriptions' content types.
* fix CR comments
* Update comments
* split into 3 files
* remove populate_notification_subscriptions
* Renamed files, refactor of populate notification subscriptions user global file updated
* added try/except, added timers
* converted populate_notification_subscriptions_user_global_reviews.py
* fix batch time execution
* converted populate_notification_subscriptions_node_file_updated
* convert to separate update and create scripts
* updated, added parameters
* move to remove_after_use
* add time track to last batch, fix proper time track for batch in node_file_updated
* convert to use review_nt
* Fix unit tests due to new constraints
* Move missing subscription creation to a helper function in utils
* Subscription list view now creates missing attributes on-the-fly
* Note: only works for when filter on "legacy id"; logs message to sentry for tracking purpose when filter on "event names".
* Fix broken `.exists()` due to complex annotated QS with `.distinct()`
* fix names of tasks
* Add notification subscriptions de-duplication v2 command
* fix naming
* Add deduplication command to notification migration
* Fix notification handling by updating legacy ID suffix from '_files_updated' to '_file_updated' across utils and views; adjust related test cases accordingly.
* fix unit tests
* Update the name of the NotificationType NODE_FILE_UPDATED to be consistent
* Rename notification type from node_files_updated to node_file_updated for consistency
* clean keys
* fix naming in templates, event_context
* remove leftover comments
* Refactor notification type references to use NotificationTypeEnum
- Updated all instances of NotificationType.Type to NotificationTypeEnum in test files and application code.
- Ensured consistency in notification type usage across various tests including auth, claims, events, and more.
- This change improves clarity and maintainability by standardizing the notification type references.
* Fix notification type reference for FILE_UPDATED
* Refactor notification type references to use NotificationTypeEnum across views and scripts
* fix unit tests
* remove imports
* fix USER_CROSSREF_DOI_PENDING event_context
* sync naming
* added explanation
* Add Celery task to disable removed beat tasks from PeriodicTask entries
* Apply suggestion from @Ostap-Zherebetskyi
* Apply suggestion from @cslzchen
* Add migrations to remove duplicate notification subscriptions and refactor notification model
* removed comment
* Refactor no-login email filtering to ensure last sent date is before last login date
* Add test to exclude users logged in before no_login_email_last_sent
* Refactor no-login email user filtering to exclude those with pending EmailTasks and recent no-login emails
* Fix CollectionSubmission URLs to use absolute_url method for consistency
* Refactor logo handling in notification methods to improve consistency and readability
* Add management command to sync notification templates
* Apply suggestion from @cslzchen
* Add management command for deleting withdrawn or failed registration files to CeleryConfig
* fix: update logo handling in send_moderator_email_task for favicon support
---------
Co-authored-by: Longze Chen <cslzchen@gmail.com>
Co-authored-by: Ostap Zherebetskyi <ozherebetskyi@exoft.net>
Co-authored-by: Bohdan Odintsov <bodintsov@exoft.net>1 parent afbbdae commit 31048c7
147 files changed
Lines changed: 2235 additions & 2770 deletions
File tree
- addons
- base
- boa
- tests
- osfstorage/tests
- admin_tests
- preprints
- users
- admin
- management
- providers
- templates/management
- users
- api_tests
- actions/views
- base
- collection_submission_actions/views
- crossref/views
- draft_registrations/views
- institutions/views
- mailhog
- provider
- nodes/views
- notifications
- preprints/views
- providers
- collections/views
- preprints/views
- tasks
- requests/views
- subscriptions/views
- users/views
- api
- crossref
- institutions
- nodes
- preprints
- providers
- requests
- subscriptions
- users
- framework/auth
- notifications
- osf_tests
- management_commands
- osf
- management/commands
- migrations
- models
- utils
- scripts
- osfstorage
- remove_after_use
- tests
- tests
- test_registrations
- website
- archiver
- notifications
- profile
- project/views
- reviews
- settings
- templates
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
575 | 575 | | |
576 | 576 | | |
577 | 577 | | |
578 | | - | |
| 578 | + | |
579 | 579 | | |
580 | | - | |
| 580 | + | |
581 | 581 | | |
582 | 582 | | |
583 | 583 | | |
584 | 584 | | |
585 | | - | |
586 | 585 | | |
587 | 586 | | |
588 | 587 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
| 186 | + | |
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
191 | 190 | | |
192 | 191 | | |
193 | 192 | | |
194 | 193 | | |
195 | 194 | | |
196 | | - | |
197 | | - | |
198 | 195 | | |
199 | 196 | | |
200 | 197 | | |
| |||
209 | 206 | | |
210 | 207 | | |
211 | 208 | | |
212 | | - | |
| 209 | + | |
213 | 210 | | |
214 | 211 | | |
215 | 212 | | |
216 | 213 | | |
217 | | - | |
218 | 214 | | |
219 | 215 | | |
220 | 216 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
750 | 750 | | |
751 | 751 | | |
752 | 752 | | |
753 | | - | |
| 753 | + | |
754 | 754 | | |
755 | 755 | | |
756 | 756 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
172 | 173 | | |
173 | 174 | | |
174 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
155 | 168 | | |
156 | 169 | | |
157 | 170 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
| 187 | + | |
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
193 | 192 | | |
194 | 193 | | |
195 | 194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
719 | 719 | | |
720 | 720 | | |
721 | 721 | | |
722 | | - | |
| 722 | + | |
723 | 723 | | |
724 | 724 | | |
725 | 725 | | |
| |||
0 commit comments