File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1391,11 +1391,26 @@ $issueKey = 'TEST-879';
13911391try {
13921392 $transition = new Transition();
13931393 $transition->setTransitionName('In Progress');
1394- $transition->setCommentBody('performing the transition via REST API.');
1394+
1395+ $doc = (new Document())
1396+ ->paragraph() // paragraph, can have child blocks (needs to be closed with `->end()`)
1397+ ->text('Issue ') // simple unstyled text
1398+ ->strong(' status') // text node embedding a `strong` mark
1399+ ->text(' ') // simple unstyled text
1400+ ->text(' changed ') // text node embedding a `em` mark
1401+ ->text('. ') // simple unstyled text
1402+ ->underline('by') // text node embedding a `underline` mark
1403+ ->em(' REST API.') // simple unstyled text
1404+ ->end() // closes `paragraph` node
1405+ ;
13951406
1396- $issueService = new IssueService();
1407+ $comment = new AtlassianDocumentFormat($doc);
1408+
1409+ $transition->setCommentBody($comment);
13971410
1411+ $issueService = new IssueService();
13981412 $issueService->transition($issueKey, $transition);
1413+
13991414} catch (JiraCloud\JiraException $e) {
14001415 $this->assertTrue(FALSE, 'add Comment Failed : ' . $e->getMessage());
14011416}
Original file line number Diff line number Diff line change 1010 */
1111class AtlassianDocumentFormat implements \JsonSerializable
1212{
13+ public array $ type ;
14+
15+ public array $ content ;
16+
17+ public string $ version ;
18+
1319 private Document $ document ;
1420
1521 public function __construct (Document |Node $ document )
Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ class Comment implements \JsonSerializable
2828
2929 public bool $ jsdPublic ;
3030
31+ public string $ renderedBody ;
32+
3133 /**
3234 * mapping function for json_mapper.
3335 *
Original file line number Diff line number Diff line change 44
55class Comments implements \JsonSerializable
66{
7- /** @var int */
8- public $ startAt ;
7+ public string $ self ;
8+
9+ public int $ startAt ;
910
10- /** @var int */
11- public $ maxResults ;
11+ public int $ maxResults ;
1212
13- /** @var int */
14- public $ total ;
13+ public int $ total ;
1514
1615 /** @var \JiraCloud\Issue\Comment[] */
1716 public $ comments ;
Original file line number Diff line number Diff line change 99 */
1010class History implements \JsonSerializable
1111{
12- /** @var int */
13- public $ id ;
12+ public int $ id ;
1413
15- /** @var \JiraCloud\Issue\Reporter */
16- public $ author ;
14+ public Reporter $ author ;
1715
18- /** @var string */
19- public $ created ;
16+ public string $ created ;
2017
21- /** @var array|null */
22- public $ items ;
18+ public ?array $ items ;
2319
2420 #[\ReturnTypeWillChange]
2521 public function jsonSerialize ()
Original file line number Diff line number Diff line change 22
33namespace JiraCloud \Issue ;
44
5+ use AllowDynamicProperties ;
56use DateTimeInterface ;
67use JiraCloud \ADF \ADFMarkType ;
78use JiraCloud \ADF \AtlassianDocumentFormat ;
89use JiraCloud \ClassSerialize ;
910use JiraCloud \Project \Project ;
1011
12+
13+ #[AllowDynamicProperties]
1114class IssueField implements \JsonSerializable
1215{
1316 use ClassSerialize;
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ class IssueType implements \JsonSerializable
1616
1717 public bool $ subtask ;
1818
19+ public string $ hierarchyLevel ;
20+
1921 /** @var \JiraCloud\Issue\IssueStatus[] */
2022 public $ statuses ;
2123
Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ class Reporter implements \JsonSerializable
2020
2121 public string $ active ;
2222
23+ public string $ timezone ;
24+
25+ public string $ accountType ;
26+
2327 private bool $ wantUnassigned = false ;
2428
2529 public string $ accountId ;
Original file line number Diff line number Diff line change @@ -23,6 +23,13 @@ class Transition implements \JsonSerializable
2323
2424 public ?array $ update = null ;
2525
26+ public bool $ hasScreen ;
27+ public bool $ isGlobal ;
28+ public bool $ isInitial ;
29+ public bool $ isAvailable ;
30+ public bool $ isConditional ;
31+ public bool $ isLooped ;
32+
2633 public function setTransitionName ($ name ): void
2734 {
2835 if (is_null ($ this ->transition )) {
Original file line number Diff line number Diff line change @@ -103,6 +103,8 @@ class Project implements \JsonSerializable
103103
104104 public int $ fieldConfigurationScheme ;
105105
106+ public string $ simplified ;
107+
106108 #[\ReturnTypeWillChange]
107109 public function jsonSerialize ()
108110 {
You can’t perform that action at this time.
0 commit comments