fix: revert database query adjustment

closes #869a6mf97
This commit is contained in:
Björn Fromme
2025-08-26 13:23:47 +02:00
parent d375e2d62b
commit d60119b9fb
+3 -7
View File
@@ -87,14 +87,10 @@ class AssignmentRepository extends ServiceEntityRepository
->setParameter('now', new \DateTimeImmutable()) ->setParameter('now', new \DateTimeImmutable())
; ;
// exclude job profiles that require trainings for teamers that didn't attend any // limit result for teamers not having any trainings AND licences
if (0 === $teamer->getTrainingAttendances()->count()) { if (0 === $teamer->getTrainingAttendances()->count() && 0 === $teamer->getLicenses()->count()) {
$qb->andWhere($qb->expr()->isNull('required_training'));
}
// exclude job profiles that require licenses for teamers that don't have any
if (0 === $teamer->getLicenses()->count()) {
$qb $qb
->andWhere($qb->expr()->isNull('required_training'))
->andWhere($qb->expr()->eq('job_profile.requiredLicenses', ':requiredLicenses')) ->andWhere($qb->expr()->eq('job_profile.requiredLicenses', ':requiredLicenses'))
->setParameter('requiredLicenses', '[]') ->setParameter('requiredLicenses', '[]')
; ;