SORMAS-Project
SORMAS-Project copied to clipboard
Bulk action - send emails - attach a document template, generate documents and upload them to the cases/contacts before sending them [5]
Feature Description
The bulk action for sending emails with attachments is implemented in a different ticket https://github.com/SORMAS-Foundation/SORMAS-Project/issues/13043.
The current ticket will enable the user to attach to each email a configurable document template. In this way, each document will contain the recipient's and entity's custom data. These documents will need to be saved on each entity they were sent for.
Added Value/Benefit
The Sormas user will be more efficient in handling operations involving multiple entities. Also will be able to easily check which entities did not work properly.
Acceptance Criteria
- [ ] For each selected entity a document will be generated and attached to the email
- [ ] Save each customized template document to the corresponding entity.
Implementation Details
Prerequisite
- existing document template
User-Flow - cases
- cases directory
- enable bulk mode
- select x cases
- bulk action "send email"
- Options: "from document template (single doc temp)" and/or "from uploaded document"
- checkbox "save the documents to the entity" (default: unchecked)
Case 1: From document templates and no upload to the entity
- frontend: progress is shown to the user
- backend:
- generate document for each entity
- send it to the case person's email It is visible that the email was sent in the email's log, but not in the document's section, as the document was not saved
Case 2: From document templates and upload to the entity
- frontend: progress is shown to the user
- backend:
- generate document for each entity
- save it to the entity
- send it to the case person's email
- Link the document to the entity
- If the email was not sent, then we delete the document (+ unlink the document)
Errorhandling:
- meaningful message plus list of uuid
in scope:
- cases and contacts
out of scope:
- event participants
- travel entries
- Errorlog
possible improvement
- save the data to a table and reconstruct the documents on the fly
- advantage: reduce the system size
- add a disclaimer if the filesize is > 1mb and the selected cases are > 20 ("You should limit the document template size as the generated document will be saved to every case")
Mockups
No response
Additional Information
Document template guide can be found: https://test-de2.sormas.netzlink.com/sormas-ui/#!configuration/documentTemplates when clicking "upload template" => document template guide
Open questions:
- Will the document be saved to the entity if the email was not sent?
- How many documents could be uploaded separately?
Comment in Open questions:
- Will the document be saved to the entity if the email was not sent? linking only on successful sending, is fine. It will be less confusing when we will open the case.
- How many documents could be uploaded separately? As it is mention #13043 : can be configured in the properties: Default 5 max. 5 will be enough.
Tested on web local setup version 1.97.0-SNAPSHOT (9655678).