Added method for fetching all tasks
Fixed fetching tasks in different states
Added integration tests for tasks in different phases