コード例 #1
0
ファイル: PlansJobs.php プロジェクト: ryankim07/testplanner
 /**
  * Observer to change status of a single plan
  * according to all user's responses
  *
  * @param $planId
  * @return mixed
  */
 public function updatePlanStatus($planId)
 {
     if (isset($planId)) {
         $plan = $this->model->find($planId);
         $testers = $plan->testers()->get();
         $results = $this->getTestersTicketsStatus($plan, $testers, 'single');
     } else {
         $plans = $this->model->all();
         foreach ($plans as $plan) {
             $testers = $plan->testers()->get();
             $results[] = $this->getTestersTicketsStatus($plan, $testers);
         }
     }
     return $results;
 }
コード例 #2
0
ファイル: PlansApi.php プロジェクト: ryankim07/testplanner
 /**
  * Check if same plan already exists by Jira build version
  *
  * @param $buildId
  * @return bool
  */
 public function checkPlanJiraBuildVersion($buildId)
 {
     $results = $this->model->where('jira_bvid', '=', $buildId)->first();
     if (isset($results->id)) {
         return false;
     }
     return true;
 }