* Add api get single issue
This commit is contained in:
@@ -1226,6 +1226,11 @@ class bugModel extends model
|
||||
->remove('comment')
|
||||
->get();
|
||||
|
||||
$relation = $this->loadModel('gitlab')->getGitlabIssueFromRelation('bug', $bugID);
|
||||
|
||||
$singleIssue = new stdclass();
|
||||
$singleIssue = $this->loadModel('gitlab')->apiSingleIssue($relation->gitlabID, $relation->issueID);
|
||||
|
||||
$this->dao->update(TABLE_BUG)->data($bug)->autoCheck()->where('id')->eq((int)$bugID)->exec();
|
||||
|
||||
$objectID = $this->loadModel('gitlab')->getGitlabIDprojectID('bug',$bugID);
|
||||
|
||||
@@ -924,6 +924,24 @@ class gitlabModel extends model
|
||||
return $issue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Api get single issue.
|
||||
*
|
||||
* @param int $gitlabID
|
||||
* @param int $projectID
|
||||
* @param object $issue
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function apiSingleIssue($gitlabID, $projectID, $issue)
|
||||
{
|
||||
$apiRoot = $this->getApiRoot($gitlabID);
|
||||
$apiPath = "/issues/{$issue}";
|
||||
|
||||
$url = sprintf($apiRoot, $apiPath);
|
||||
return json_decode(commonModel::http($url, $issue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Api create issue.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user