public function allIssue($client, $projectId) { $issueList = $client->api('issue')->all(array('project_id' => $projectId, 'limit' => 10000)); try { $issue = new Issue(); foreach ($issueList['issues'] as $key => $value) { $issue->exchangeArray($value); $issueInfo = $this->getIssueTable()->saveIssue($issue); // GET all Time Entry detail related to Issue $this->timeEntry($client, $value['id']); } } catch (\Exception $ex) { //send mail if any error occur during CRON JOB } }
public function allIssue() { $issueId = 54293; $client = new Client("https://portal.optimusinfo.com/redmine/", 'vikas.singhal', 'vzi950'); $issueInfo = $client->api('issue')->show($issueId); //echo "<pre>";print_r($ issueInfo);die; $issue = new Issue(); foreach ($issueInfo as $key => $value) { $issue->exchangeArray($value); $this->getIssueTable()->saveIssue($issue); } return true; }