[#NUMERO_TICKET] TITRE TICKET #2

Merged
malio merged 302 commits from develop into main 2026-03-18 13:16:19 +00:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit d6399c20e1 - Show all commits

View File

@@ -54,7 +54,7 @@ class CreateTaskTool
$task = new Task();
$task->setProject($project);
$task->setTitle($title);
$task->setNumber($this->taskRepository->findMaxNumberByProject($project) + 1);
$task->setNumber($this->taskRepository->findMaxNumberByProjectForUpdate($project) + 1);
if (null !== $description) {
$task->setDescription($description);

View File

@@ -28,7 +28,7 @@ class TaskRepository extends ServiceEntityRepository
$conn = $this->getEntityManager()->getConnection();
$result = $conn->fetchOne(
'SELECT COALESCE(MAX(number), 0) FROM task WHERE project_id = :project FOR UPDATE',
'SELECT COALESCE(MAX(number), 0) FROM task WHERE project_id = :project',
['project' => $project->getId()],
);