Skip to content

Commit

Permalink
- add issue's changelog mapping class (History, ChangeLog)
Browse files Browse the repository at this point in the history
-  resource expansion (fixed #145)
  • Loading branch information
lesstif committed Apr 3, 2018
1 parent f23cbd0 commit cd2638d
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/Issue/ChangeLog.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

namespace JiraRestApi\Issue;

/**
* Issue ChangeLog
*
* Class ChangeLog
*
* @package JiraRestApi\Issue
*/
class ChangeLog implements \JsonSerializable
{
/** @var integer */
public $startAt;

/** @var integer */
public $maxResults;

/** @var integer */
public $total;

/** @var History[]|null */
public $histories;

public function jsonSerialize()
{
return array_filter(get_object_vars($this));
}
}
30 changes: 30 additions & 0 deletions src/Issue/History.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

namespace JiraRestApi\Issue;

/**
* ChangeLog History
*
* Class History
*
* @package JiraRestApi\Issue
*/
class History implements \JsonSerializable
{
/** @var integer */
public $id;

/** @var Reporter */
public $author;

/** @var string */
public $created;

/** @var array|null */
public $items;

public function jsonSerialize()
{
return array_filter(get_object_vars($this));
}
}
21 changes: 21 additions & 0 deletions src/Issue/Issue.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,27 @@ class Issue implements \JsonSerializable
/** @var IssueField */
public $fields;

/** @var array|null */
public $renderedFields;

/** @var array|null */
public $names;

/** @var array|null */
public $schema;

/** @var array|null */
public $transitions;

/** @var array|null */
public $operations;

/** @var array|null */
public $editmeta;

/** @var ChangeLog|null */
public $changelog;

public function jsonSerialize()
{
return array_filter(get_object_vars($this));
Expand Down

0 comments on commit cd2638d

Please sign in to comment.