mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 02:23:51 +00:00
improve filter form
- hide form in some places ; - i18n - hide status filtering with a parameter (redundant)
This commit is contained in:
@@ -107,6 +107,15 @@ class SingleTaskRepository extends \Doctrine\ORM\EntityRepository
|
||||
$qb->andWhere($qb->expr()->eq('st.person', ':person'));
|
||||
$qb->setParameter('person', $params['person']);
|
||||
}
|
||||
|
||||
if (\array_key_exists('unassigned', $params) and $params['unassigned'] === true) {
|
||||
if (\array_key_exists('user', $params) and !empty($params['user'])) {
|
||||
throw new \UnexpectedValueException("You should not require for "
|
||||
. "unassigned tasks and tasks assigned to some user.");
|
||||
}
|
||||
|
||||
$qb->andWhere($qb->expr()->isNull('st.assignee'));
|
||||
}
|
||||
|
||||
if (\array_key_exists('user', $params) and !empty($params['user'])) {
|
||||
$qb->andWhere($qb->expr()->eq('st.assignee', ':user'));
|
||||
|
Reference in New Issue
Block a user