-
Notifications
You must be signed in to change notification settings - Fork 351
[ENG-8064] Notification Refactor Phase 2 #11322
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
base: develop
Are you sure you want to change the base?
Conversation
--------- Co-authored-by: John Tordoff <[email protected]> Co-authored-by: Ostap Zherebetskyi <[email protected]> Co-authored-by: Bohdan Odintsov <[email protected]> Co-authored-by: John Tordoff <>
* Fix moderator digest * Fix unit tests
…ion (#11324) * Fix issue with user confirmation/merger creating subscription * Add docstrings
* Add No Login to notification template and add to tests
…tion-refactor-p2-s * Conflicts have not been resolved in this merge since we want to track how we fixed the conflicts due to complexity * api/nodes/serializers.py * osf/models/user.py * tests/test_auth.py * tests/test_webtests.py * website/templates/node_request_institutional_access_request.html.mako
…plate-with-naming [ENG-8988] Fix/notification contrib template with naming
[ENG-8997] Turn on script tests
api_tests/draft_registrations/views/test_draft_registration_contributor_list.py
Show resolved
Hide resolved
| @@ -467,631 +462,6 @@ def test_wiki_url(self): | |||
| assert self._url_to_body(self.wiki.deep_url) == self._url_to_body(self.wiki.url) | |||
|
|
|||
|
|
|||
| @pytest.mark.enable_bookmark_creation | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please confirm this to be intended removal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed
| @@ -125,36 +82,6 @@ def add_poster_by_email(conference, message): | |||
|
|
|||
| utils.upload_attachments(user, node, message.attachments) | |||
|
|
|||
| download_url = node.web_url_for( | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these removals intended?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this feature is depreciated
[ENG-8996] Fix moderator added template
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Several leftover questions:
General opinion on templates:
We need to look through each one, identify redundant variables in event context and remove them. Also we need to verify that all required variables are indeed passed to templates.
This review contains only several topmost templates, therefore there supposedly are many more issues than comments
| @@ -15,6 +15,7 @@ | |||
|
|
|||
| @file_updated.connect | |||
| def update_file_guid_referent(self, target, event_type, payload, user=None): | |||
| event_type = payload['action'] | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we even need event_type parameter in this case?
I guess we should remove it or at least make it optional
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's necessary because somewhere in the waterbulter get_auth logic the event_type gets overridden and in those other signals receivers the distinction matters, but not in this signal.
| context['contributors_url'] = f'{self.machineable.target.absolute_url}contributors/' | ||
| context['project_settings_url'] = f'{self.machineable.target.absolute_url}settings/' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are not needed, they are not present in template
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep they should be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was addressed in the PR "Fix NR Review Comments."
| @@ -7,7 +7,7 @@ | |||
| </tr> | |||
| <tr> | |||
| <td style="border-collapse: collapse;"> | |||
| Hello ${fullname},<br> | |||
| Hello ${user_fullname},<br> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
during invocation, fullname is passed instead of user_fullname
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok we will fix the mismatch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was addressed in the PR "Fix NR Review Comments."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
results are not being passed during invocation
| event_context={ | ||
| 'domain': settings.DOMAIN, | ||
| 'user_fullname': user.fullname, | ||
| 'user__id': user._id, | ||
| 'src__id': src._id, | ||
| 'src_url': src.url, | ||
| 'src_title': src.title, | ||
| 'results': results, | ||
| 'url': url, | ||
| 'can_change_preferences': False, | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need only src_title here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok we will remove the extraneous arguments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was addressed in the PR "Fix NR Review Comments."
[ENG-9005] Fix/update v2 subscriptions
…tests [ENG-9603] Fix Reset Password Tests
…om/centerforopenscience/osf.io into fix-test-add-contributors-notifications
…-notifications [ENG-9600][ENG-9606] Notification refactor fix contributor adding issues
…om/centerforopenscience/osf.io into fix-institutional-request-templates
…-templates [ENG-9605] Fix institutional node request updates template
…cations [ENG-9713] new_public_project notifications to happen everytime a project is made public
…e to their new table
…dd default message frequency
…file-subs [ENG-9723] Fix issue with duplicate file update subscriptions
…igrations [ENG-9719] Fix issues where legacy notification subscription settings didn't mov…
[ENG-9673] Fix spelling in template
[ENG-9675] Fix collection template link
[ENG-9674] Fix password reset link
…_email [ENG-9670] Moderator Notifications: Moderator added email notifications doesn't include any links to provider
…notification_subscriptions [ENG-9738] fix migrate_legacy_notification_subscriptions
Purpose
TBD
Changes
TBD
QA Notes
TBD
Documentation
TBD
Side Effects
TBD
Ticket
https://openscience.atlassian.net/browse/ENG-8064