It would be handy if we could combine AND() and OR() functionality in a single branch.
For instance, when a task is overdue in a project, I would like to send a message if it is in one of two sections. The message would change depending on whether the task is assigned or not.
Because I cannot combine AND and OR, I have to set up four branches to achieve this:
Trigger: Task is overdue
-
Check if: Task is in secion 1 AND task is assigned
-
Check if: Task is in section 2 AND task is assigned
1 and 2 would use the same messsage, addressing the assignee -
Check if task is in section 1 AND task is not assigned
-
Check if task is in section 2 AND task is not assigned
3 and 4 would also use the the same message, addressing someone else
A better way to deal with this would be:
- Check if
AND( task_has_assignee, OR( task_in_section_1, task_in_seciton_2))
Add comment
@task.assignee
- Check if
task_in_section_1 OR task_in_seciton_2
add comment @mentioning someone else
(I’m not checking if it is unassigned, as that check would obviously result in TRUE as it is the only alternative when it is in one of those sections and the first branch wasn’t activated.)
Related: General conditions for rules