예제 #1
0
 /**
  * @authorize
  * @method GET
  * @customRoute('projects/int/config')
  */
 public function getActiveConfig($projectId)
 {
     TestCasesRepository::getInstance()->clearRemainingTestCasesOnDayEnd();
     ConfigurationRepository::getInstance()->updateParkedConfigurations();
     $activeConfig = ConfigurationRepository::getInstance()->getActiveProjectConfiguration($projectId);
     return $activeConfig;
 }
예제 #2
0
 public function resumeExecution($projectId, $configId)
 {
     $this->beginTran();
     $configRepo = ConfigurationRepository::getInstance();
     $activeUsers = ProjectsRepository::getInstance()->getProjectAssignedUsers($projectId, $configId);
     $configRepo->closeActiveConfiguration($configId);
     $newConfig = $configRepo->createNewConfiguration($projectId);
     SetupRepository::getInstance()->assignUsersToProject($projectId, $activeUsers, $newConfig['configId']);
     $this->commit();
 }
예제 #3
0
 private function process($projectId, $duration, $activeUsers, $algorithm, $date)
 {
     $newConfig = ConfigurationRepository::getInstance()->createNewConfiguration($projectId);
     $expectedTCPD = $this->calcExpectedTCPD($activeUsers);
     $this->assignUsersToProject($projectId, $activeUsers, $newConfig['configId']);
     $this->assignDaysToProject($projectId, $duration, $expectedTCPD, $newConfig['configId']);
     $this->allocateTestCases($projectId, $algorithm, $newConfig['configId'], $date, false);
     $this->commit();
 }
예제 #4
0
 /**
  * @authorize
  * @method POST
  * @customRoute('projects/int/testCases/changeDate');
  */
 public function changeDate($projectId, ChangeDayBindingModel $model)
 {
     $configuration = ConfigurationRepository::getInstance()->getActiveProjectConfiguration($projectId);
     $changeResult = TestCasesRepository::getInstance()->changeTestCaseDate($model, $configuration['configId']);
     return $changeResult;
 }
예제 #5
0
 /**
  * @authorize
  * @method PUT
  * @customRoute('projects/int/resumeExecution')
  */
 public function resumeProjectExecution($projectId)
 {
     $config = ConfigurationRepository::getInstance()->getActiveProjectConfiguration($projectId);
     DaysRepository::getInstance()->resumeExecution($projectId, $config['configId']);
     return ['msg' => "Project execution resumed."];
 }
예제 #6
0
 /**
  * @authorize
  * @method POST
  * @customRoute('projects/int/setup/clear')
  */
 public function clearProjectSetup($projectId, ResetBindingModel $model)
 {
     $config = ConfigurationRepository::getInstance()->getActiveProjectConfiguration($projectId);
     SetupRepository::getInstance()->clearSetup($projectId, $config, $model->reason);
     return ['msg' => "Configuration reset successful for project with Id {$projectId}!"];
 }