SORMAS-Project icon indicating copy to clipboard operation
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]

Open sergiupacurariu opened this issue 11 months ago • 1 comments

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

  1. cases directory
  2. enable bulk mode
  3. select x cases
  4. bulk action "send email"
  5. Options: "from document template (single doc temp)" and/or "from uploaded document"
  6. 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:
  1. generate document for each entity
  2. 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:
  1. generate document for each entity
  2. save it to the entity
  3. send it to the case person's email
  4. Link the document to the entity
  5. 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:

  1. Will the document be saved to the entity if the email was not sent?
  2. How many documents could be uploaded separately?

sergiupacurariu avatar Mar 13 '24 12:03 sergiupacurariu

Comment in Open questions:

  1. 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.
  2. 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.

XavCol avatar Apr 08 '24 09:04 XavCol

Tested on web local setup version 1.97.0-SNAPSHOT (9655678).

richardbartha avatar Jun 03 '24 06:06 richardbartha