Nesting AND() and OR() conditions

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

  1. Check if: Task is in secion 1 AND task is assigned

  2. Check if: Task is in section 2 AND task is assigned
    1 and 2 would use the same messsage, addressing the assignee

  3. Check if task is in section 1 AND task is not assigned

  4. 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:

  1. Check if AND( task_has_assignee, OR( task_in_section_1, task_in_seciton_2)) :arrow_right: Add comment @task.assignee
  2. Check if task_in_section_1 OR task_in_seciton_2 :arrow_right: 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

4 Likes

Agreed, it’s a good suggestion for Asana to implement.

Just FYI, our Flowsana rules have this capability now. :wink:

2 Likes

As it does with half of the improvements I suggest for Asana rules it appears. I’m impressed.