/**
  * Displayes a messages that todo comment has been posted
  *
  * @author Atul atri
  *
  * @return void
  */
 public function TodoCommentPostSuccess()
 {
     $_JsonWriter = new SWIFT_JsonWriter();
     echo $_JsonWriter->setResponseCode(200)->SetData(array('task' => 'todo_comment'))->toJson();
 }
 public function DeleteTodo($_ticketId)
 {
     $_JsonWriter = new SWIFT_JsonWriter();
     $_todoInfo = SWIFT_TodoTicketLink::getTodoInfo($_ticketId);
     if ($_todoInfo !== false) {
         $_todoId = $_todoInfo['todoid'];
         $_projectId = $_todoInfo['projectid'];
         try {
             $_TodoSrv = new SWIFT_APITodos();
             $_TodoSrv->DeleteTodo($_projectId, $_todoId);
         } catch (Exception $_e) {
             echo $_JsonWriter->setResponseCode(502)->toJson();
             return;
         }
         SWIFT_TodoTicketLink::deleteTodo($_todoId);
     }
     echo $_JsonWriter->setResponseCode(200)->toJson();
 }