Task is Red even if the latest task run was successful

Details

Description

As Ive played around with trying to get the batch task to work on Windows, I
have 4 failed task builds/runs. Then when I had one success run of the task, the
task icon would still be red. The task list shows red, and it is even red when I
show the task item page. The build history for the task, shows 4 failed and 1
success.

Steps to reproduce:
1. create a task with a command that will fail (ie executes a command that
doesnt exists)
2. Run the task 4 times
3. Make sure that they fail
4. Updated the task so it runs "dir" or "ls"
5. Run the task
6. Make sure that it works
7. Show the task list
8. The task will be still red
9. Show the build history
10. Make sure the build history contains one success