Skip to content

Commit

Permalink
[BUGFIX] Properly soft-delete scheduler task groups
Browse files Browse the repository at this point in the history
Use update() over delete() to set hidden
field to 1 to soft-delete instead of
completely removing the row from DB

Resolves: #100251
Related: #99874
Releases: main
Change-Id: I8bc8a8c26e3f1918f253019604b7131eafa7e961
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78210
Reviewed-by: Nikita Hovratov <nikita.h@live.de>
Tested-by: Stefan Bürk <stefan@buerk.tech>
Reviewed-by: Stefan Bürk <stefan@buerk.tech>
Tested-by: Nikita Hovratov <nikita.h@live.de>
Tested-by: core-ci <typo3@b13.com>
  • Loading branch information
lolli42 authored and nhovratov committed Mar 22, 2023
1 parent 0a30116 commit 4ea278a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@ private function getGroupsWithoutTasks(array $taskGroupsWithTasks): array
private function groupRemove(int $groupId): int
{
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tx_scheduler_task_group');
return $queryBuilder->delete('tx_scheduler_task_group')
return $queryBuilder->update('tx_scheduler_task_group')
->where($queryBuilder->expr()->eq('uid', $groupId))
->set('deleted', 1)
->executeStatement();
Expand Down

0 comments on commit 4ea278a

Please sign in to comment.