Filter tasks based on  status