diff --git a/Classes/Service/MaintenanceService.php b/Classes/Service/MaintenanceService.php index a341b2c58..0d4719390 100644 --- a/Classes/Service/MaintenanceService.php +++ b/Classes/Service/MaintenanceService.php @@ -171,6 +171,10 @@ protected function getGdprCleanupRegistrations(int $days): array $queryBuilder->expr()->lte( 'e.enddate', $queryBuilder->createNamedParameter($maxEndDate->getTimestamp(), Connection::PARAM_INT) + ), + $queryBuilder->expr()->gt( + 'e.enddate', + $queryBuilder->createNamedParameter(0, Connection::PARAM_INT) ) )->executeQuery() ->fetchAllAssociative(); diff --git a/Configuration/Services.yaml b/Configuration/Services.yaml index bfa1a9624..e408cdf54 100644 --- a/Configuration/Services.yaml +++ b/Configuration/Services.yaml @@ -19,7 +19,7 @@ services: tags: - name: 'console.command' command: 'sf_event_mgt:cleanup:gdpr' - description: 'Delete registrations of expired events' + description: 'Delete registrations of expired events (registrations for events with no enddate will be ignored)' schedulable: true DERHANSEN\SfEventMgt\EventListener\ChangeCacheTimeout: diff --git a/Documentation/ForAdministrators/CliCommands/Index.rst b/Documentation/ForAdministrators/CliCommands/Index.rst index 69a7efe50..139f8c7fb 100644 --- a/Documentation/ForAdministrators/CliCommands/Index.rst +++ b/Documentation/ForAdministrators/CliCommands/Index.rst @@ -45,7 +45,7 @@ saved registration field data for expired events, a CLI command is available. **Arguments** -* `days` - Amount of days reduced from todays date for expired event selection +* `days` - Amount of days reduced from todays date for expired event selection. **Options** @@ -63,3 +63,8 @@ Output :class: with-shadow It is recommended to setup a scheduler task to execute the CLI command periodically. + +.. note:: + + The GDPR cleanup only includes events, which have a start- and enddate. Events with no enddate are + not covered by the cleanup, since it is not possible to calculate, when the event has ended.