feat : add RecurrenceHandler for auto-creating next recurring task
When a task transitions to a final status, archives the current task and creates a new occurrence with recalculated dates. Adds TaskStatusRepository::findFirstNonFinal() to assign the initial status to the new task. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -14,4 +14,16 @@ class TaskStatusRepository extends ServiceEntityRepository
|
||||
{
|
||||
parent::__construct($registry, TaskStatus::class);
|
||||
}
|
||||
|
||||
public function findFirstNonFinal(): ?TaskStatus
|
||||
{
|
||||
return $this->createQueryBuilder('s')
|
||||
->where('s.isFinal = :final')
|
||||
->setParameter('final', false)
|
||||
->orderBy('s.position', 'ASC')
|
||||
->setMaxResults(1)
|
||||
->getQuery()
|
||||
->getOneOrNullResult()
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user