Release 2.0.15 (#3970)
This commit is contained in:
@@ -93,6 +93,14 @@ class TimesheetQuery extends ActivityQuery implements BillableInterface
|
||||
return array_values($this->users);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if there is one or more users in the query
|
||||
*/
|
||||
public function hasUsers(): bool
|
||||
{
|
||||
return $this->timesheetUser !== null || \count($this->users) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Limit the data exclusively to the user.
|
||||
*/
|
||||
|
||||
@@ -66,28 +66,6 @@ class TagRepository extends EntityRepository
|
||||
return $this->findOneBy(['name' => $tagName]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find ids of the given tagNames separated by comma
|
||||
* @param string $tagNames
|
||||
* @return array
|
||||
*/
|
||||
public function findIdsByTagNameList(string $tagNames): array
|
||||
{
|
||||
$qb = $this
|
||||
->createQueryBuilder('t')
|
||||
->select('t.id');
|
||||
$list = array_filter(array_unique(array_map('trim', explode(',', $tagNames))));
|
||||
$cnt = 0;
|
||||
foreach ($list as $listElem) {
|
||||
$qb
|
||||
->orWhere('t.name like :elem' . $cnt)
|
||||
->setParameter('elem' . $cnt, '%' . $listElem . '%');
|
||||
$cnt++;
|
||||
}
|
||||
|
||||
return array_column($qb->getQuery()->getScalarResult(), 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Find all tag names in an alphabetical order
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user