* daysBlocked feature added
* blocked worklog entries are not counted towards spike spent time
This commit is contained in:
@@ -92,11 +92,21 @@ class JiraCollectorService
|
||||
->setLabels($jsonIssue['fields']['labels'])
|
||||
;
|
||||
|
||||
$timeSpent = 0;
|
||||
array_map(function($worklog) use (&$timeSpent){
|
||||
$timeSpent += $worklog['timeSpentSeconds'];
|
||||
$spikeTimeSpent = 0;
|
||||
array_map(function($worklog) use (&$spikeTimeSpent){
|
||||
$spikeTimeSpent += strtoupper($worklog['comment']) == 'BLOCKED'
|
||||
? 0
|
||||
: $worklog['timeSpentSeconds'];
|
||||
}, $jsonIssue['fields']['worklog']['worklogs']);
|
||||
$kanbanEntry->setWorklog(ceil($timeSpent/3600));
|
||||
$kanbanEntry->setWorklog(ceil($spikeTimeSpent/3600));
|
||||
|
||||
$secondsBlocked = 0;
|
||||
array_map(function($worklog) use (&$secondsBlocked){
|
||||
$secondsBlocked += strtoupper($worklog['comment']) == 'BLOCKED'
|
||||
? $worklog['timeSpentSeconds']
|
||||
: 0;
|
||||
}, $jsonIssue['fields']['worklog']['worklogs']);
|
||||
$kanbanEntry->setDaysBlocked(ceil($secondsBlocked/86400));
|
||||
|
||||
// externalId : customfield_10010
|
||||
if(isset($jsonIssue['fields']['customfield_10010'])) {
|
||||
|
||||
Reference in New Issue
Block a user