Fill the task calendar's working days in order instead of evenly
A task's estimate now takes each working day of its planned period up to the assignee's free capacity before the next day gets anything, so 9 h is booked as 7.5 h + 1.5 h rather than 4.5 h + 4.5 h. What does not fit in the period still moves past its end and makes the task end later. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
@@ -55,7 +55,7 @@ it('moves a task to another person by dropping it and books their days', functio
|
||||
expect($task->refresh()->planned_from?->format('Y-m-d'))->toBe('2026-12-28')
|
||||
->and($task->planned_to?->format('Y-m-d'))->toBe('2026-12-29')
|
||||
->and($task->assignee_user_id)->toBe($this->other->id)
|
||||
->and(DB::table('task_bookings')->where('task_id', $task->id)->orderBy('day')->pluck('minutes', 'day')->all())->toBe(['2026-12-28' => 360, '2026-12-29' => 360]);
|
||||
->and(DB::table('task_bookings')->where('task_id', $task->id)->orderBy('day')->pluck('minutes', 'day')->all())->toBe(['2026-12-28' => 450, '2026-12-29' => 270]);
|
||||
});
|
||||
|
||||
it('continues a task on the next working day when the day is full', function () {
|
||||
|
||||
Reference in New Issue
Block a user