Skip to content

Commit

Permalink
#182: Default to work id worker not longer exists in Leantime worklog…
Browse files Browse the repository at this point in the history
… sync
  • Loading branch information
tuj committed Jan 23, 2024
1 parent b7b16d1 commit 3253f00
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

* Default to work id worker not longer exists in Leantime worklog sync.
* Added commands to manage data providers.
* Changed how errors are handled in Leantime api calls.
* Modified getSprintReportData to work with Leantime data
Expand Down
2 changes: 1 addition & 1 deletion src/Service/LeantimeApiService.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ public function getWorklogDataCollection(string $projectId): WorklogDataCollecti
if (isset($worklog->ticketId)) {
$worklogData->projectTrackerId = $worklog->id;
$worklogData->comment = $worklog->description ?? '';
$worklogData->worker = $workers[$worklog->userId];
$worklogData->worker = $workers[$worklog->userId] ?? $worklog->userId;
$worklogData->timeSpentSeconds = (int) ($worklog->hours * 60 * 60);
$worklogData->started = new \DateTime($worklog->workDate);
$worklogData->projectTrackerIsBilled = false;
Expand Down

0 comments on commit 3253f00

Please sign in to comment.