mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-27 18:13:48 +00:00
filter tasks by type, allow to overload task edit page and section menu
This commit is contained in:
@@ -127,6 +127,11 @@ class SingleTaskRepository extends \Doctrine\ORM\EntityRepository
|
||||
$qb->andWhere($qb->expr()->eq('st.circle', ':scope'));
|
||||
$qb->setParameter('scope', $params['scope']);
|
||||
}
|
||||
|
||||
if (\array_key_exists('types', $params)) {
|
||||
$qb->andWhere($qb->expr()->in('st.type', ':types'));
|
||||
$qb->setParameter('types', $params['types']);
|
||||
}
|
||||
|
||||
if (\array_key_exists('date_status', $params) and !empty($params['date_status'])) {
|
||||
$this->addTypeFilter($qb, $params);
|
||||
@@ -135,10 +140,6 @@ class SingleTaskRepository extends \Doctrine\ORM\EntityRepository
|
||||
if (\array_key_exists('is_closed', $params)) {
|
||||
$qb->andWhere($this->buildIsClosed($qb, !$params['is_closed']));
|
||||
}
|
||||
|
||||
if (\array_key_exists('types', $params) && count($params['types']) > 0) {
|
||||
$qb->andWhere($qb->expr()->in('st.type', $params['types']));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user