Commit af546f29 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Correction du query builder des thèses pour le rôle Directeur de thèse.

parent 39e3697a
Loading
Loading
Loading
Loading
Loading
+5 −2
Changes for module/Application/src/Application/Service/These/TheseRechercheService.php: 5 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ use Application\Entity\Db\These;
use Application\Entity\Db\TypeStructure;
use Application\Entity\Db\UniteRecherche;
use Application\Entity\UserWrapper;
use Application\Filter\EtablissementPrefixFilter;
use Application\QueryBuilder\TheseQueryBuilder;
use Application\Service\EcoleDoctorale\EcoleDoctoraleServiceAwareTrait;
use Application\Service\Etablissement\EtablissementServiceAwareTrait;
@@ -360,10 +361,12 @@ class TheseRechercheService
                    default:
                        throw new RuntimeException("Cas imprévu!");
                }
                $individuSourceCode = (new EtablissementPrefixFilter())
                    ->addPrefixEtablissementTo($userWrapper->getSupannId(), $role->getStructure()->getCode());
                $qb
                    ->join('t.acteurs', 'adt', Join::WITH, 'adt.role = :role')
                    ->join('adt.individu', 'idt', Join::WITH, 'idt.sourceCode like :idtSourceCode')
                    ->setParameter('idtSourceCode', '%::' . $userWrapper->getSupannId())
                    ->join('adt.individu', 'idt', Join::WITH, 'idt.sourceCode = :idtSourceCode')
                    ->setParameter('idtSourceCode', $individuSourceCode)
                    ->setParameter('role', $role);
            }
            // sinon role = membre jury