agritheory / approvals

Customizable Approval Workflows
Other
4 stars 1 forks source link

Refactor Message #51

Open agritheory opened 2 months ago

agritheory commented 2 months ago

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

fproldan commented 1 month 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:

Rejection Notification:

It's the same as the Approval but we also need to figure out a way to identify it's a rejection.

agritheory commented 1 month ago

@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.