From d546f37d5083ac586ed9762356e0a05e6f1ef697 Mon Sep 17 00:00:00 2001 From: Mohamed Abdul-Fattah Date: Mon, 6 Jun 2022 19:36:22 +0000 Subject: [PATCH] Issue-27: Log WorkLog Staring Date Send started datetime attribute on creating Jira worklogs to correctly register worklogs in past dates when synced in future dates. --- .gitignore | 1 + jiralogger | 2 +- src/Services/Connect/JiraConnect.php | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 9e9c0ee..189b9e3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /.idea/ +/.vscode/ /vendor/ /**/database.db /**/test.db diff --git a/jiralogger b/jiralogger index efa4950..4c5f9c1 100755 --- a/jiralogger +++ b/jiralogger @@ -13,7 +13,7 @@ require __DIR__ . '/vendor/autoload.php'; * * @see https://semver.org/ */ -define('APP_VERSION', '0.5.1'); +define('APP_VERSION', '0.5.2'); /** * Application name to be displayed on listing commands diff --git a/src/Services/Connect/JiraConnect.php b/src/Services/Connect/JiraConnect.php index 1a8df7e..a88c054 100644 --- a/src/Services/Connect/JiraConnect.php +++ b/src/Services/Connect/JiraConnect.php @@ -2,6 +2,7 @@ namespace App\Services\Connect; +use DateTime; use Exception; use PDOException; use App\Entities\Task; @@ -248,6 +249,7 @@ protected function getPayload(Task $task): array return [ 'comment' => $task->getDescription(), 'timeSpentSeconds' => $task->logInSeconds(), + 'started' => (new DateTime($task->getStartedAt()))->format('Y-m-d\TH:i:s\.000+0000'), ]; }