added emails and tests #93

Open
Tycho-van-den-Heuvel wants to merge 1 commit from Tycho-van-den-Heuvel/intranet:feat/emails-when-creating-servicelogs-through-api into main
Contributor

If you create servicelogs through the api. no emails are sent. This PR adds that feature.

When creating a servicelog through the CRM it only sends an email if it's a new servicelog. I wanted to keep this property in the api as well.

When submitting a checklist we don't want to send an email since it will flood the email even more because submitting checklists will be more frequent

If you create servicelogs through the api. no emails are sent. This PR adds that feature. When creating a servicelog through the CRM it only sends an email if it's a new servicelog. I wanted to keep this property in the api as well. When submitting a checklist we don't want to send an email since it will flood the email even more because submitting checklists will be more frequent
added emails and tests
All checks were successful
Verify Pull Request / tests (pull_request) Successful in 1m50s
1062ded229
@ -205,0 +206,4 @@
# don't bother participants with checklists emails
if (
servicelog.situation != Servicelog.MSC_UNCHECKED_TODO and self.request.POST
Owner

Rather than checking its not Servicelog.MSC_UNCHECKED_TODO, can we use an allowlist of events which should trigger an email?>

Rather than checking its not `Servicelog.MSC_UNCHECKED_TODO`, can we use an allowlist of events which should trigger an email?>
All checks were successful
Verify Pull Request / tests (pull_request) Successful in 1m50s
Required
Details
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u feat/emails-when-creating-servicelogs-through-api:Tycho-van-den-Heuvel-feat/emails-when-creating-servicelogs-through-api
git switch Tycho-van-den-Heuvel-feat/emails-when-creating-servicelogs-through-api
Sign in to join this conversation.
No reviewers
No labels
Draft
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
msl/intranet!93
No description provided.