44
55use JiraRestApi \Configuration \ConfigurationInterface ;
66use JiraRestApi \Issue \Issue ;
7+ use JiraRestApi \Sprint \Sprint ;
78use Psr \Log \LoggerInterface ;
89
910class 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}
0 commit comments