added emails and tests #93

Open
Tycho-van-den-Heuvel wants to merge 3 commits 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
api/views.py Outdated
@ -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?>
allowlist
Some checks failed
Verify Pull Request / tests (pull_request) Failing after 41s
f352ec4235
ruff
All checks were successful
Verify Pull Request / tests (pull_request) Successful in 2m0s
85c7c0b3db
Luke-Watts approved these changes 2026-06-21 20:40:59 +02:00
Luke-Watts force-pushed feat/emails-when-creating-servicelogs-through-api from 85c7c0b3db
All checks were successful
Verify Pull Request / tests (pull_request) Successful in 2m0s
to a6ed66f973
All checks were successful
Verify Pull Request / tests (pull_request) Successful in 1m45s
2026-06-21 20:41:07 +02:00
Compare
Luke-Watts force-pushed feat/emails-when-creating-servicelogs-through-api from a6ed66f973
All checks were successful
Verify Pull Request / tests (pull_request) Successful in 1m45s
to c404f68861
All checks were successful
Verify Pull Request / tests (pull_request) Successful in 2m26s
2026-06-22 07:40:33 +02:00
Compare
Luke-Watts force-pushed feat/emails-when-creating-servicelogs-through-api from c404f68861
All checks were successful
Verify Pull Request / tests (pull_request) Successful in 2m26s
to e0bad91e0f
All checks were successful
Verify Pull Request / tests (pull_request) Successful in 1m53s
2026-07-17 17:57:58 +02:00
Compare
Luke-Watts force-pushed feat/emails-when-creating-servicelogs-through-api from e0bad91e0f
All checks were successful
Verify Pull Request / tests (pull_request) Successful in 1m53s
to 8359ee1fd8
All checks were successful
Verify Pull Request / tests (pull_request) Successful in 1m55s
2026-07-18 05:12:05 +02:00
Compare
All checks were successful
Verify Pull Request / tests (pull_request) Successful in 1m55s
Required
Details
This pull request has changes conflicting with the target branch.
  • api/tests.py
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.