Commit 197f7cf3 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

[FIX] Module StepStar : erreur dans l'extraction du mail du doctorant.

parent c5438e2c
Loading
Loading
Loading
Loading
+1 −1
Changes for module/StepStar/src/StepStar/Service/Fetch/FetchService.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ class FetchService
    {
        $qb = $this->theseService->getRepository()->createQueryBuilder('t');
        $qb
            ->addSelect('e, d, di, dip, ed, ur, f, orf, m, rdv, mel, es, eds, urs, a, ai, r')
            ->addSelect('e, d, di, dip, dimc, ed, ur, f, orf, m, rdv, mel, es, eds, urs, a, ai, r')
            ->join('t.etablissement', 'e')
            ->join('t.doctorant', 'd')
            ->join('d.individu', 'di')
+4 −4
Changes for module/StepStar/src/StepStar/Service/Xml/XmlService.php: 4 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -387,7 +387,7 @@ class XmlService
        $contratDoctoral = $this->extractContratDoctoralFromThese($these) ? 'oui' : 'non';
        $conventionCifre = $this->extractConventionCifreFromThese($these) ? 'oui' : 'non';

        $metadonnees = current($these['metadonnees']) ?: null;
        $metadonnees = current($these['metadonnees']) ?: [];

        $dateFinConfidentialite = $these['dateFinConfidentialite'] ?? null;
        $dateDebutConfidentialite = null;
@@ -451,9 +451,9 @@ class XmlService
//            self::NNT => '2013FOR31234',

            // métadonnées
            self::TITRE => $metadonnees['titre'] ?: $these['titre'],
            self::TITRE => $metadonnees['titre'] ?? $these['titre'],
            self::TITRE_LANGUE => $langue = $metadonnees['langue'] ?? 'fr',
            self::TITRE_TRADUIT => $metadonnees['titreAutreLangue'],
            self::TITRE_TRADUIT => $metadonnees['titreAutreLangue'] ?? null,
            self::TITRE_TRADUIT_LANGUE => $langue === 'fr' ? 'en' : 'fr',
            self::RESUME_FRANCAIS => $this->sanitizeXML($metadonnees['resume'] ?? ''),
            self::RESUME_ANGLAIS => $this->sanitizeXML($metadonnees['resumeAnglais'] ?? ''),
@@ -645,7 +645,7 @@ class XmlService

    private function extractEmailPersoFromThese(array $these): ?string
    {
        foreach ((array) $these['mailsConfirmations'] as $mailConfirmation) {
        foreach ((array) $these['doctorant']['individu']['mailsConfirmations'] as $mailConfirmation) {
            if ($mailConfirmation['etat'] === MailConfirmation::CONFIRME) {
                return $mailConfirmation['email'];
            }