mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-04 04:35:06 +03:00
17
Automation
Anna No edited this page 2022-06-09 12:22:10 +07:00
Use Case Scenario
- Select target class for automation from dropdown (Card, Space, Board etc).
- Select trigger.
- Based on target class and its attributes supporting Automation render tabs (Move, Add, Remove, Dates, Fields, Custom Fields, Sort, Chunter, Tracker etc), each tab contains several commands which could be added to the trigger (Update/ Sort etc).
- For attribute based commands, select attribute from drop down and configure command.
- Add commands and Save automation
Design
Automation commands
Automation object
- target class
- trigger
- fetch query
- list of Automation Commands to execute
Commands
Based on target class
Based on attribute class
Triggers
User action
- triggered from context menu (could choose several modes, e.g. context, editor etc, available modes could be configured by mixin, by default only context is available).
- calls Automation Service api by special action handler.
Database trigger
- has one trigger catching database transactions
- finds all automation objects for transaction class (automation target class)
- checks what automations are applicable for object
- calls Automation Service api to execute commands
Issues
One automation item can contain one trigger, but several actions to perform on it.
Move date field means updating it from current value, e.g. moving date value by 1 day would mean to update it to <current value + 1 date>.
Sorting or Setting to the top / bottom of the list would required recalculating ranks on server.
Verify triggering is only once. For example, rule is when the name contains some particular text, then a user updates the name again containing the same text, we should not trigger the action.
Values validation (??)