JiraRestApi\Issue\IssueService::getWorklogById PHP Method

getWorklogById() public method

get getWorklog by Id.
public getWorklogById ( mixed $issueIdOrKey, integer $workLogId ) : PaginatedWorklog
$issueIdOrKey mixed
$workLogId integer
return PaginatedWorklog object
    public function getWorklogById($issueIdOrKey, $workLogId)
    {
        $ret = $this->exec($this->uri . "/{$issueIdOrKey}/worklog/{$workLogId}");
        $this->log->addDebug("getWorklogById res={$ret}\n");
        $worklog = $this->json_mapper->map(json_decode($ret), new Worklog());
        return $worklog;
    }

Usage Example

Exemplo n.º 1
0
 /**
  * @depends testUpdateWorkLogInIssue
  */
 public function testGetWorkLogById($workLogid)
 {
     try {
         $issueService = new IssueService();
         $worklog = $issueService->getWorklogById($this->issueKey, $workLogid);
         Dumper::dump($worklog);
     } catch (JiraException $e) {
         $this->assertTrue(false, 'testGetWorkLogById Failed : ' . $e->getMessage());
     }
 }