fix: correct filtering of assignments by staffing count

This commit is contained in:
Björn Fromme
2024-04-04 10:31:43 +02:00
parent d8cfff1162
commit f1132ea487
2 changed files with 4 additions and 3 deletions
+3 -3
View File
@@ -87,8 +87,8 @@ class AssignmentRepository extends ServiceEntityRepository
break;
case Assignment::STATUS_PARTLY_STAFFED:
$qb
->having('assignment.availableDispositions > COUNT(disposition.id)')
->andHaving('COUNT(application.id) = 0')
->having('COUNT(disposition.id) > 0')
->andHaving('assignment.availableDispositions > COUNT(disposition.id)')
;
break;
case Assignment::STATUS_STAFFING:
@@ -98,7 +98,7 @@ class AssignmentRepository extends ServiceEntityRepository
;
break;
case Assignment::STATUS_UNSTAFFED:
$qb->having('assignment.availableDispositions > COUNT(disposition.id)');
$qb->having('COUNT(disposition.id) = 0');
break;
}
}