mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 00:02:15 +01:00
Fix bug in time-entry.update-multiple; Add computed property for client_id
This commit is contained in:
committed by
Constantin Graf
parent
b3b84db004
commit
d5a4df738f
@@ -373,6 +373,10 @@ class TimeEntryController extends Controller
|
||||
$oldTask = $timeEntry->task;
|
||||
|
||||
$timeEntry->fill($changes);
|
||||
// If project is changed, but task is not, we remove the old task from the time entry
|
||||
if ($oldProject !== null && $project !== null && $oldProject->isNot($project) && $task === null) {
|
||||
$timeEntry->task()->disassociate();
|
||||
}
|
||||
if ($overwriteClient) {
|
||||
$timeEntry->client()->associate($client);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user