Пример #1
0
 public function runRemoveMilestone(TBGRequest $request)
 {
     if ($this->getUser()->canManageProject($this->selected_project) || $this->getUser()->canManageProjectReleases($this->selected_project)) {
         $milestone = new TBGMilestone($request['milestone_id']);
         $no_milestone = new TBGMilestone(0);
         $no_milestone->setProject($milestone->getProject());
         $milestone->delete();
         return $this->renderJSON(array('issue_count' => $no_milestone->countIssues(), 'hours' => $no_milestone->getHoursEstimated(), 'points' => $no_milestone->getPointsEstimated()));
     }
     $this->getResponse()->setHttpStatus(400);
     return $this->renderJSON(array("error" => $this->getI18n()->__("You don't have access to modify milestones")));
 }