Skip to content

Commit 7415c37

Browse files
committed
Merge branch 'master' into develop
2 parents c0e4e7a + ff20405 commit 7415c37

File tree

2 files changed

+31
-4
lines changed

2 files changed

+31
-4
lines changed

src/Board/BoardService.php

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use JiraRestApi\Configuration\ConfigurationInterface;
66
use JiraRestApi\Issue\Issue;
7+
use JiraRestApi\Sprint\Sprint;
78
use Psr\Log\LoggerInterface;
89

910
class BoardService extends \JiraRestApi\JiraClient
@@ -17,13 +18,13 @@ public function __construct(ConfigurationInterface $configuration = null, Logger
1718
}
1819

1920
/**
20-
* get all project list.
21+
* get all boards list.
2122
*
2223
* @param array $paramArray
2324
*
2425
* @throws \JiraRestApi\JiraException
2526
*
26-
* @return Project[] array of Project class
27+
* @return Board[] array of Board class
2728
*/
2829
public function getBoardList($paramArray = [])
2930
{
@@ -48,10 +49,22 @@ public function getBoard($id, $paramArray = [])
4849
public function getBoardIssues($id, $paramArray = [])
4950
{
5051
$json = $this->exec($this->uri.'/'.$id.'/issue'.$this->toHttpQueryParameter($paramArray), null);
51-
$board = $this->json_mapper->mapArray(
52+
$issues = $this->json_mapper->mapArray(
5253
json_decode($json)->issues, new \ArrayObject(), Issue::class
5354
);
5455

55-
return $board;
56+
return $issues;
57+
}
58+
59+
public function getBoardSprints($boardId, $paramArray = [])
60+
{
61+
$json = $this->exec($this->uri.'/'.$boardId.'/sprint'.$this->toHttpQueryParameter($paramArray), null);
62+
$sprints = $this->json_mapper->mapArray(
63+
json_decode($json)->values,
64+
new \ArrayObject(),
65+
Sprint::class
66+
);
67+
68+
return $sprints;
5669
}
5770
}

src/Sprint/SprintService.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
namespace JiraRestApi\Sprint;
1010

1111
use JiraRestApi\Configuration\ConfigurationInterface;
12+
use JiraRestApi\Issue\Issue;
1213
use JiraRestApi\JiraClient;
1314
use JiraRestApi\JiraException;
1415
use Psr\Log\LoggerInterface;
@@ -53,4 +54,17 @@ public function getSprint($sprintId)
5354
json_decode($ret), new Sprint()
5455
);
5556
}
57+
58+
public function getSprintIssues($sprintId, $paramArray = [])
59+
{
60+
$json = $this->exec($this->uri.'/'.$sprintId.'/issue'.$this->toHttpQueryParameter($paramArray), null);
61+
62+
$issues = $this->json_mapper->mapArray(
63+
json_decode($json)->issues,
64+
new \ArrayObject(),
65+
Issue::class
66+
);
67+
68+
return $issues;
69+
}
5670
}

0 commit comments

Comments
 (0)