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

[#2055] Add option to use different email tamplate for status notifications that require action #1001

Merged
merged 2 commits into from
Feb 5, 2024

Conversation

pi-sigma
Copy link
Contributor

@pi-sigma pi-sigma commented Jan 30, 2024

Taiga #2055

  • Added the option to use a special template for status change notifications that indicate that action is required
  • Took the opportunity to refactor some of the code in openzaak/notifications.py

TODO:

  • the case_status_notification_action_required template needs to be implemented (cf. this PR)

@pi-sigma pi-sigma changed the title [#2055] Add different email tamplate for status notifications that require action [#2055] Add option to use different email tamplate for status notifications that require action Jan 30, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jan 30, 2024

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (c5784fd) 94.75% compared to head (32ba6a1) 94.76%.
Report is 5 commits behind head on develop.

Files Patch % Lines
src/open_inwoner/openzaak/notifications.py 93.33% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1001      +/-   ##
===========================================
+ Coverage    94.75%   94.76%   +0.01%     
===========================================
  Files          869      872       +3     
  Lines        30288    30559     +271     
===========================================
+ Hits         28698    28958     +260     
- Misses        1590     1601      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pi-sigma pi-sigma force-pushed the feature/2055-status-notifications branch from 67abe20 to 2fd1225 Compare February 1, 2024 11:24
@pi-sigma pi-sigma marked this pull request as ready for review February 1, 2024 14:34
@pi-sigma
Copy link
Contributor Author

pi-sigma commented Feb 1, 2024

@stevenbal I'm waiting for Jiro's PR for the action_required template, but the rest should work as is.

Copy link
Contributor

@stevenbal stevenbal 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, just a few remarks/questions. Good that you split up handle_status_notification into several functions, because it was getting quite complicated logic-wise

"This email is used to notify people about a new status being set on their case "
"that requires action on their part."
),
"subject_default": "Action required",
Copy link
Contributor

Choose a reason for hiding this comment

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

I would probably make this Dutch, something like this maybe:

Suggested change
"subject_default": "Action required",
"subject_default": "Uw zaak is bijgewerkt op {{ site_name }} (actie vereist)",

In case there is a specific subject in the design that we're going to use, you can ignore this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Design is still WIP, so I'm going to change this as suggested.

src/open_inwoner/openzaak/notifications.py Outdated Show resolved Hide resolved
)
return
if (
not oz_config.skip_notification_statustype_informeren
Copy link
Contributor

Choose a reason for hiding this comment

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

Does oz_config.skip_notification_statustype_informeren have to be checked here? Since it is being checked in check_zaaktype_config as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think so, because oz_config.skip_notification_statustype_informeren is not checked on its own in either function. In check_status_type, it is part of a check that involves status_type.informeren, and in check_zaaktype_config it's part of a check that also involves ztc. So I don't think it is redundant in either case.

@pi-sigma pi-sigma marked this pull request as draft February 2, 2024 13:59
@pi-sigma pi-sigma force-pushed the feature/2055-status-notifications branch from 2fd1225 to 32ba6a1 Compare February 2, 2024 14:11
@pi-sigma pi-sigma marked this pull request as ready for review February 2, 2024 14:43
@alextreme alextreme merged commit 3f7430c into develop Feb 5, 2024
14 checks passed
@alextreme alextreme deleted the feature/2055-status-notifications branch February 5, 2024 13:20
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.

5 participants