@handle_response_format
@treeio_login_required
def task_set_status(request, task_id, status_id, response_format='html'):
 task = get_object_or_404(Task, pk=task_id)
 if (not request.user.profile.has_permission(task, mode='x')):
  return user_denied(request, message="You don't have access to this Task")
 status = get_object_or_404(TaskStatus, pk=status_id)
 if (not request.user.profile.has_permission(status)):
  return user_denied(request, message="You don't have access to this Task Status")
 if (not (task.status == status)):
  task.status = status
  task.save()
 return task_view(request, task_id, response_format)

@ handle_response_format @ treeio_login_required def task_set_status ( request , task_id , status_id , response_format = 'html' ) : task = get_object_or_404 ( Task , pk = task_id ) if ( not request . user . profile . has_permission ( task , mode = 'x' ) ) : return user_denied ( request , message = "You don't have access to this Task" ) status = get_object_or_404 ( TaskStatus , pk = status_id ) if ( not request . user . profile . has_permission ( status ) ) : return user_denied ( request , message = "You don't have access to this Task Status" ) if ( not ( task . status == status ) ) : task . status = status task . save ( ) return task_view ( request , task_id , response_format )
task quick set: status .