fix tag query to show all tags of an item, even if not included in query (#810)

This commit is contained in:
Kevin Papst
2019-05-25 16:27:01 +02:00
committed by GitHub
parent 46905e9504
commit d18019159b
3 changed files with 23 additions and 15 deletions

View File

@@ -84,10 +84,11 @@ abstract class TimesheetAbstractController extends AbstractController
$query->setUser($this->getUser());
}
if ($query->hasTags()) {
$tags = $query->getTags(true);
if (!empty($tags)) {
$query->setTags(
new ArrayCollection(
$this->getDoctrine()->getRepository(Tag::class)->findIdsByTagNameList(implode(',', $query->getTags()->toArray()))
$this->getDoctrine()->getRepository(Tag::class)->findIdsByTagNameList(implode(',', $tags))
)
);
}