There're tons of solutions depending on what you want to do with this next. The simplest one seems to be:
$scope.clicked = function(task){
task.status = nextStatus(task.status);
};
function nextStatus(st){
return $scope.statuses[$scope.statuses.indexOf(st) + 1];
}
Note that you also should pass task to the function:
<a ng-click='clicked(task)'>