Commit 82ee99b9 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Merge branch 'develop'

parents 09961a66 6e002c64
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ class ValidationController extends AbstractController
            $notification->setThese($these);

            if ($action === 'valider') {
                $this->validationService->validateRdvBu($these);
                $this->validationService->validateRdvBu($these, $this->userContextService->getIdentityIndividu());
                $successMessage = "Validation enregistrée avec succès.";

                // notification (doctorant: à la 1ere validation seulement)
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ class ValidationQueryBuilder extends DefaultQueryBuilder
        $this
            ->addSelect("t, tv, i")
            ->join("$this->rootAlias.these", "t")
            ->join("$this->rootAlias.individu", "i")
            ->leftJoin("$this->rootAlias.individu", "i")
            ->join("$this->rootAlias.typeValidation", 'tv')
        ;

+1 −1
Original line number Diff line number Diff line
@@ -421,7 +421,7 @@ class TheseService extends BaseService implements ListenerAggregateInterface

        // si tout est renseigné, on valide automatiquement
        if ($this->isInfosBuSaisies($these)) {
            $this->validationService->validateRdvBu($these);
            $this->validationService->validateRdvBu($these, $this->userContextService->getIdentityIndividu());
            $successMessage = "Validation enregistrée avec succès.";

            // notification BDD et BU + doctorant (à la 1ere validation seulement)
+4 −3
Original line number Diff line number Diff line
@@ -57,11 +57,12 @@ class ValidationService extends BaseService

    /**
     * @param These $these
     * @param Individu $createur
     * @return Validation
     */
    public function validateRdvBu(These $these)
    public function validateRdvBu(These $these, Individu $createur)
    {
        $v = new Validation($this->getTypeValidation(TypeValidation::CODE_RDV_BU), $these);
        $v = new Validation($this->getTypeValidation(TypeValidation::CODE_RDV_BU), $these, $createur);

        $this->entityManager->persist($v);
        $this->entityManager->flush($v);
@@ -85,7 +86,7 @@ class ValidationService extends BaseService

        if (!$v) {
            throw new RuntimeException(
                sprintf("Aucune validation de type '%s' trouvée pour la thèse %s", TypeValidation::CODE_RDV_BU, $these));
                sprintf("Aucune validation de type '%s' trouvée pour la thèse %s", TypeValidation::CODE_RDV_BU, $these->getId()));
        }

        $v->historiser();