Release 2.10 (#4549)

This commit is contained in:
Kevin Papst
2024-01-19 12:05:07 +01:00
committed by GitHub
parent afd60a67f6
commit 46739795ff
52 changed files with 348 additions and 292 deletions

View File

@@ -315,7 +315,7 @@ class TimesheetEditForm extends AbstractType
function (FormEvent $event) {
/** @var Timesheet|null $timesheet */
$timesheet = $event->getData();
if (null === $timesheet || null === $timesheet->getEnd()) {
if (null === $timesheet || $timesheet->isRunning()) {
$event->getForm()->get('duration')->setData(null);
}
}
@@ -340,7 +340,7 @@ class TimesheetEditForm extends AbstractType
// only apply the duration, if the end is not yet set
// without that check, the end would be overwritten and the real end time would be lost
if (($forceApply && $duration > 0) || ($duration > 0 && null === $timesheet->getEnd())) {
if (($forceApply && $duration > 0) || ($duration > 0 && $timesheet->isRunning())) {
$end = clone $timesheet->getBegin();
$end->modify('+ ' . $duration . 'seconds');
$timesheet->setEnd($end);