src/Kreta/Component/VCS/Repository/IssueRepository.php
public function findRelatedIssuesByRepository(RepositoryInterface $repository, $shortName, $numericId)
    {
        $repositoryIds = [];
        foreach ($repository->getProjects() as $project) {
            $repositoryIds[] = $project->getId();
        }

        $queryBuilder = $this->repository->createQueryBuilder('i')
            ->leftJoin('i.project', 'p');
        $this->addCriteria($queryBuilder, [
                'in'          => ['i.project' => $repositoryIds],
                'p.shortName' => $shortName, 'i.numericId' => $numericId,
            ]
        );

        return $queryBuilder->getQuery()->getResult();
    }
public function findRelatedIssuesByRepository(RepositoryInterface $repository, $shortName, $numericId)
    {
        $repositoryIds = [];
        foreach ($repository->getProjects() as $project) {
            $repositoryIds[] = $project->getId();
        }

        $queryBuilder = $this->repository->createQueryBuilder('i')
            ->leftJoin('i.project', 'p');
        $this->addCriteria($queryBuilder, [
                'in'          => ['i.project' => $repositoryIds],
                'p.shortName' => $shortName, 'i.numericId' => $numericId,
            ]
        );

        return $queryBuilder->getQuery()->getResult();
    }
public function findRelatedIssuesByRepository ( RepositoryInterface $ repository , $ shortName , $ numericId ) { $ repositoryIds = [ ] ; foreach ( $ repository -> getProjects ( ) as $ project ) { $ repositoryIds [ ] = $ project -> getId ( ) ; } $ queryBuilder = $ this -> repository -> createQueryBuilder ( 'i' ) -> leftJoin ( 'i.project' , 'p' ) ; $ this -> addCriteria ( $ queryBuilder , [ 'in' => [ 'i.project' => $ repositoryIds ] , 'p.shortName' => $ shortName , 'i.numericId' => $ numericId , ] ) ; return $ queryBuilder -> getQuery ( ) -> getResult ( ) ; }
Finds related issues of repository, short name and numeric id given.

@param \Kreta\Component\VCS\Model\Interfaces\RepositoryInterface $repository The repository
@param string                                                    $shortName  The short name
@param string                                                    $numericId  The numeric id

@return \Kreta\Component\Issue\Model\Interfaces\IssueInterface[]
Finds related issues of repository short name and numeric id given .