From f63e2d0e2ece3c6e9b8f459496df7e19b8c12267 Mon Sep 17 00:00:00 2001 From: Aerex Date: Fri, 31 Jul 2020 02:35:51 -0500 Subject: [PATCH] fix: Used completed property instead of dtend in vtodo event --- README.md | 2 +- config.yaml => example-config.yaml | 0 lib/Storages/Taskwarrior.php | 4 ++-- 3 files changed, 3 insertions(+), 3 deletions(-) rename config.yaml => example-config.yaml (100%) diff --git a/README.md b/README.md index 2561fa5..2320c97 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ composer require aerex/baikal-storage-plugin ``` ## Configuration -Copy sample configuration to your baikal installation. Make sure that the folder is writable +Copy sample configuration to your baikal installation. Make sure that the folder is *writable* by your webserver (e.g Apache, Nginx) ## Usage - Add the plugin to `Core/Frameworks/Baikal/Core/Server.php` diff --git a/config.yaml b/example-config.yaml similarity index 100% rename from config.yaml rename to example-config.yaml diff --git a/lib/Storages/Taskwarrior.php b/lib/Storages/Taskwarrior.php index 303772b..8edd475 100644 --- a/lib/Storages/Taskwarrior.php +++ b/lib/Storages/Taskwarrior.php @@ -110,8 +110,8 @@ class Taskwarrior implements IStorage { $task['start'] = $vtodo->DTSTART->getDateTime()->format(\DateTime::ISO8601); } - if (isset($vtodo->DTEND)){ - $task['end'] = $vtodo->DTEND->getDateTime()->format(\DateTime::ISO8601); + if (isset($vtodo->COMPLETED)){ + $task['end'] = $vtodo->COMPLETED->getDateTime()->format(\DateTime::ISO8601); } if (isset($vtodo->{'LAST-MODIFIED'})) {