diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..bc10c555c --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,5 @@ +Branch master +============= + +- fix bug in filter task form: allow to show the list of users, which was hidden when the user had access to multiple centers; + diff --git a/Form/SingleTaskListType.php b/Form/SingleTaskListType.php index f6b47e409..0cd4eba6b 100644 --- a/Form/SingleTaskListType.php +++ b/Form/SingleTaskListType.php @@ -237,10 +237,11 @@ class SingleTaskListType extends AbstractType } $i = 0; + $circleCenterCond = $qb->expr()->orX(); foreach ($centers as $center) { $circles = $this->authorizationHelper->getReachableCircles($user, $role, $center); // add condition about person and circle - $qb->andWhere( + $circleCenterCond->add( $qb->expr()->andX() ->add($qb->expr()->eq('person.center', ':center_'.$i)) ->add($qb->expr()->in('task.circle', ':circles_'.$i)) @@ -252,6 +253,7 @@ class SingleTaskListType extends AbstractType // increase counter $i++; } + $qb->andWhere($circleCenterCond); return $qb->getQuery()->getResult(); }