From 3c158cc015ac6186467ea60f210463785ec71595 Mon Sep 17 00:00:00 2001 From: Constantin Graf Date: Fri, 26 Apr 2024 00:20:00 +0200 Subject: [PATCH] Fixed billable rate in import --- app/Service/Import/Importers/ClockifyTimeEntriesImporter.php | 1 + app/Service/Import/Importers/TogglTimeEntriesImporter.php | 1 + 2 files changed, 2 insertions(+) diff --git a/app/Service/Import/Importers/ClockifyTimeEntriesImporter.php b/app/Service/Import/Importers/ClockifyTimeEntriesImporter.php index a7e52ee5..3b8246b6 100644 --- a/app/Service/Import/Importers/ClockifyTimeEntriesImporter.php +++ b/app/Service/Import/Importers/ClockifyTimeEntriesImporter.php @@ -117,6 +117,7 @@ class ClockifyTimeEntriesImporter extends DefaultImporter throw new ImportException('End date ("'.$record['End Date'].'") or time ("'.$record['End Time'].'") are invalid'); } $timeEntry->end = $end; + $timeEntry->setComputedAttributeValue('billable_rate'); $timeEntry->save(); $this->timeEntriesCreated++; } diff --git a/app/Service/Import/Importers/TogglTimeEntriesImporter.php b/app/Service/Import/Importers/TogglTimeEntriesImporter.php index 6f082d0f..826e56d6 100644 --- a/app/Service/Import/Importers/TogglTimeEntriesImporter.php +++ b/app/Service/Import/Importers/TogglTimeEntriesImporter.php @@ -102,6 +102,7 @@ class TogglTimeEntriesImporter extends DefaultImporter throw new ImportException('End date ("'.$record['End date'].'") or time ("'.$record['End time'].'") are invalid'); } $timeEntry->end = $end; + $timeEntry->setComputedAttributeValue('billable_rate'); $timeEntry->save(); $this->timeEntriesCreated++; }