🚧 Send timezone_offset when time_entries are being created/updated#468
🚧 Send timezone_offset when time_entries are being created/updated#468Angeluz-07 merged 4 commits intomasterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #468 +/- ##
==========================================
- Coverage 89.74% 89.46% -0.28%
==========================================
Files 72 72
Lines 1316 1319 +3
Branches 89 90 +1
==========================================
- Hits 1181 1180 -1
- Misses 105 109 +4
Partials 30 30
Continue to review full report at Codecov.
|
| return new actions.CreateEntry({ project_id: action.idProjectSwitching, start_date: stopDateForEntry.toISOString() }); | ||
| return new actions.CreateEntry({ | ||
| project_id: action.idProjectSwitching, | ||
| start_date: stopDateForEntry.toISOString(), |
There was a problem hiding this comment.
I know this is not your change, but it seems something is wrong here:
start_date: stopDateForEntry.toISOString(),
There was a problem hiding this comment.
This has to do with the logic of clocking out, when switching a project. The stopDate of the entry being clocked out is the startDate of the new time-entry.
There was a problem hiding this comment.
Yep, I get what you mean. In that case I would change line 23 to this:
const newTimeEntryStartDate = stopDateForEntry.setSeconds(stopDateForEntry.getSeconds() + 1 );
and line 26 to:
start_date: newTimeEntryStartDate.toISOString(),
In that way, it is easier to read.
fixes #464