/** * @authorize * @method GET * @customRoute('projects/int/config') */ public function getActiveConfig($projectId) { TestCasesRepository::getInstance()->clearRemainingTestCasesOnDayEnd(); ConfigurationRepository::getInstance()->updateParkedConfigurations(); $activeConfig = ConfigurationRepository::getInstance()->getActiveProjectConfiguration($projectId); return $activeConfig; }
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(); }
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(); }
/** * @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; }
/** * @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."]; }
/** * @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}!"]; }