Skip to content

Commit ff20405

Browse files
authored
Merge pull request #248 from ghunti/get_sprint_issues
Add capability to retrieve all sprint issues
2 parents b5424d3 + e994da2 commit ff20405

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

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)