public function updatesuiteslistAction() { $data = array(); try { $projectId = $this->getRequest_ProjectID(); $this->getAcl()->checkAvailable(Model_ACL::TASK_QA_TEST_PLAN_EDIT, $projectId); $planId = $this->getRequest_ID(); $suites = json_decode($this->getRequest()->getParam('suites')); $m = Model_DBMapper_ApplicationMapper::get_instance(); $o = $m->find($projectId); if (!isset($o)) { throw new Exception('There is no such Application'); } $m = Model_DBMapper_TestPlanMapper::get_instance(); $o = $m->find($planId); if (!isset($o)) { throw new Exception('There is no such Test Plan'); } /** @var $m Model_DBMapper_TestPlanTestSuiteMapMapper */ $m = Model_DBMapper_TestPlanTestSuiteMapMapper::get_instance(); $m->updateTestSuitesOfTestPlan($planId, $suites); $data = array("success" => true); } catch (Exception $ex) { $data = array("success" => false, "error" => $ex->getMessage()); } $this->_helper->json->sendJson($data); }
protected function getTestPlanTestSuiteMapMapper() { if (null === $this->_test_plan_test_suite_map_mapper) { $this->setTestPlanTestSuiteMapMapper(Model_DBMapper_TestPlanTestSuiteMapMapper::get_instance()); } return $this->_test_plan_test_suite_map_mapper; }