-
Notifications
You must be signed in to change notification settings - Fork 603
feat: add auto-generated IPR email notifications on WG Call for Adoption or WG Last Call #9322
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
Conversation
β¦l for Adoption or WG Last Call
|
Thank you for cleaning up the PR! |
ietf/doc/mails.py
Outdated
| def email_stream_state_changed_cfa(request, doc, cfa_duration=2): | ||
| (to, cc)= gather_address_lists('doc_stream_state_edited', doc=doc) | ||
|
|
||
| end_date= date_today(DEADLINE_TZINFO) + datetime.timedelta(days=14) |
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.
Should probably be days=7*cfa_duration
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.
Thanks - committed
ietf/doc/mails.py
Outdated
| def email_stream_state_changed_wglc(request, doc, wglc_duration=2): | ||
| (to, cc)= gather_address_lists('doc_stream_state_edited', doc=doc) | ||
|
|
||
| end_date= date_today(DEADLINE_TZINFO) + datetime.timedelta(days=14) |
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.
Should probably be days = 7 * wglc_duration
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.
Thanks - committed
f94d247 to
37859ab
Compare
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.
A couple of quick observations - I haven't reviewed the changes to the tests yet.
ietf/doc/mails.py
Outdated
| cc=cc) | ||
|
|
||
| def email_stream_state_changed_cfa(request, doc, cfa_duration=2): | ||
| (to, cc)= gather_address_lists('doc_stream_state_edited', doc=doc) |
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 doesn't reach the recipients requested in the #9142 - it likely needs its own mailtrigger (see https://datatracker.ietf.org/mailtrigger/name/doc_stream_state_edited/ and https://datatracker.ietf.org/mailtrigger/name/).
Adding those will require a migration - let us know if you're already familiar with django migrations - if not, we can add them.
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.
Added a new mailtrigger with the correct recipients, soz for not spotting that. The migration ran OK in my container - however since test settings disable migrations I re-edited tests_draft back to its original state to avoid migration-related errors. Let me know if you recommend testing or running the migration via another method.
ietf/doc/views_draft.py
Outdated
| # ipr notifs on cfa wglc | ||
| if new_state.slug == "c-adopt": | ||
| email_stream_state_changed_cfa(request, doc) | ||
|
|
||
| if new_state.slug == "wg-lc": | ||
| email_stream_state_changed_wglc(request, doc) | ||
|
|
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 should be inside the if statement at L1752
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.
Committed, thanks
ietf/doc/mails.py
Outdated
| cc=cc) | ||
|
|
||
| def email_stream_state_changed_wglc(request, doc, wglc_duration=2): | ||
| (to, cc)= gather_address_lists('doc_stream_state_edited', doc=doc) |
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.
See the comment on L108 - this will also need a new mailtrigger.
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.
Committed change with new mailtrigger
|
Datatracker's test harness is custom and one of the things it does for performance reasons is to use a fixture and some factories (and occasionally a utility function for meeting test data that we're trying to deprecate). These new mailtriggers should get added to the fixture. After you've run the migrations in your local database run this: It might pick up some unrelated changes - don't worry if it does. Thanks for sticking with this - we're very happy to have the help. But if this kind of arcana becomes too much, let us know and we can finish out the PR. |
Have added the new fixture and tests for the CFA state, which should hopefully work alongside the existing stream state edited mailtrigger. WGLC isn't strictly tested but is in compatible format with the former. I tried to make everything as consistent as possible with the existing IETF repo. Feel free to finish out the PR with any additional edits. Thank you to everyone for the comments and guidance! |
The two actions have the same recipients to start with, but that may change over time. Mailtrigger names should describe "what happened to trigger this email?". Changed the utility names to match the actions.
Using a list name as the From will not work - the mail infrastructure blocks such mail when it is submitted.
|
I'm taking this PR and finishing it out. @nouralmaa, please don't add any new commits. I'll be pushing into this branch. (I'm discovering many things that need to be touched - there are multiple views dealing with the different workflows for draft adoption that need to be included). |
|
There's a bit more for me to do here - I'll move this further along soon.
|
|
Leaving the AoE change to the global one that's coming for the datatracker |
Codecov Reportβ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9322 +/- ##
==========================================
- Coverage 88.74% 88.73% -0.01%
==========================================
Files 320 320
Lines 41674 41807 +133
==========================================
+ Hits 36984 37098 +114
- Misses 4690 4709 +19 β View full report in Codecov by Sentry. π New features to boost your workflow:
|
fixes #9142