Open agritheory opened 2 months ago
@agritheory
A good alternative could be using the ToDo
as an "integrator" for the notifications. This solves the problem of having one Notification per DocType and using some hack for the trigger and the recipient.
We could have 2 notifications for ToDo
, one for Approval Notification and another for Rejection Notification, basically will be the same with different values in the Condition
field.
We have the following scenarios:
Approval Notification:
Document Approval Rule
:
condition
should be doc.document_approval_rule != ""
ToDo
generated by this workflow.Rejection Notification:
It's the same as the Approval but we also need to figure out a way to identify it's a rejection.
Document Approval Rule
Document Approval Rule
@fproldan
Approval requested "manually": We don't have any way to identify the ToDo generated by this workflow.
We should be able to link the ToDo to a User Document Approval to know when this workflow is used.
The Message field in Document Approval Rule should be refactored to link to a Notification. This means that approvals can be delivered via different channels: Slack for rejections, email for approvals, for example.
Approval Notification and Rejection Notification