Commit 048bcf26 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Merge branch 'release_5.3.2'

parents 641ed677 8b596d82
Loading
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
Journal des modifications
=========================

5.3.2
-----
- Module Soutenance : 2 nouvelles qualités possibles : 'Autre membre de rang B' et Associate Professor - Équivalent HDR'
- [FIX] Erreur dans le test de pertinence des étapes de dépôt d'une version corrigée (SQL).
- [FIX] Remise de la fonction getNbInscription effacée car sans d'usage (explicite)
- [FIX] Remise du controle de sursis pour les validations acteurs
- [FIX] Inversion de l'ordre de génération des avis de souteances et procés verbaux

5.3.1
-----
- [FIX] Donnée : ajout de garde lorsque le mail fourni par les données sources est " "
+251 −0
Original line number Diff line number Diff line
# Version 5.3.2

## 1. Sur le serveur d'application

- Placez-vous dans le répertoire de l'application puis lancez la commande suivante
  pour installer la nouvelle version :

```bash
git fetch --tags && git checkout --force 5.3.2 && bash ./install.sh
```

- Selon le moteur PHP que vous avez installé, rechargez le service, exemple :
    - php7.4-fpm         : `service php7.4-fpm reload`
    - apache2-mod-php7.4 : `service apache2 reload`

## 2. Dans la base de données

```sql
-- Module Soutenance : 2 nouvelles qualités possibles. 
insert into soutenance_qualite (id, libelle, rang, hdr, emeritat, histo_creation, histo_createur_id, histo_modification, histo_modificateur_id)
select nextval('soutenance_qualite_id_seq'), 'Autre membre de rang B', 'B', 'N', 'N', current_timestamp, 1, current_timestamp, 1;
insert into soutenance_qualite (id, libelle, rang, hdr, emeritat, histo_creation, histo_createur_id, histo_modification, histo_modificateur_id)
select nextval('soutenance_qualite_id_seq'), 'Associate Professor - Équivalent HDR', 'B', 'O', 'N', current_timestamp, 1, current_timestamp, 1;

--
-- [FIX] Erreur dans le test de pertinence des étapes de dépôt d'une version corrigée.
--
create or replace view v_wf_etape_pertin(these_id, etape_id, code, ordre, id) as
SELECT alias38.these_id::numeric                                                   AS these_id,
       alias38.etape_id::numeric                                                   AS etape_id,
       alias38.code,
       alias38.ordre,
       row_number() OVER (ORDER BY 1::integer, 2::integer, 3::integer, 4::integer) AS id
FROM (SELECT t.id AS these_id,
             e.id AS etape_id,
             e.code,
             e.ordre
      FROM these t
               JOIN wf_etape e ON e.code::text = 'VALIDATION_PAGE_DE_COUVERTURE'::text
      WHERE t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text])
      UNION ALL
      SELECT t.id AS these_id,
             e.id AS etape_id,
             e.code,
             e.ordre
      FROM these t
               JOIN wf_etape e ON e.code::text = 'DEPOT_VERSION_ORIGINALE'::text
      WHERE t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text])
      UNION ALL
      SELECT t.id AS these_id,
             e.id AS etape_id,
             e.code,
             e.ordre
      FROM these t
               JOIN wf_etape e ON e.code::text = 'AUTORISATION_DIFFUSION_THESE'::text
      WHERE t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text])
      UNION ALL
      SELECT t.id AS these_id,
             e.id AS etape_id,
             e.code,
             e.ordre
      FROM these t
               JOIN wf_etape e ON e.code::text = 'ATTESTATIONS'::text
      WHERE t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text])
      UNION ALL
      SELECT t.id AS these_id,
             e.id AS etape_id,
             e.code,
             e.ordre
      FROM these t
               JOIN wf_etape e ON e.code::text = 'SIGNALEMENT_THESE'::text
      WHERE t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text])
      UNION ALL
      SELECT t.id AS these_id,
             e.id AS etape_id,
             e.code,
             e.ordre
      FROM these t
               JOIN wf_etape e ON e.code::text = 'ARCHIVABILITE_VERSION_ORIGINALE'::text
      WHERE t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text])
      UNION ALL
      SELECT t.id AS these_id,
             e.id AS etape_id,
             e.code,
             e.ordre
      FROM these t
               JOIN wf_etape e ON e.code::text = 'DEPOT_VERSION_ARCHIVAGE'::text
               JOIN v_situ_archivab_vo situ ON situ.these_id = t.id AND situ.est_valide = false
      WHERE t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text])
      UNION ALL
      SELECT t.id AS these_id,
             e.id AS etape_id,
             e.code,
             e.ordre
      FROM these t
               JOIN wf_etape e ON e.code::text = 'ARCHIVABILITE_VERSION_ARCHIVAGE'::text
               JOIN v_situ_archivab_vo situ ON situ.these_id = t.id AND situ.est_valide = false
      WHERE t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text])
      UNION ALL
      SELECT t.id AS these_id,
             e.id AS etape_id,
             e.code,
             e.ordre
      FROM these t
               JOIN wf_etape e ON e.code::text = 'VERIFICATION_VERSION_ARCHIVAGE'::text
               JOIN v_situ_archivab_va situ ON situ.these_id = t.id AND situ.est_valide = true
      WHERE t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text])
      UNION ALL
      SELECT t.id AS these_id,
             e.id AS etape_id,
             e.code,
             e.ordre
      FROM these t
               JOIN wf_etape e ON e.code::text = 'RDV_BU_SAISIE_DOCTORANT'::text
      WHERE t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text])
      UNION ALL
      SELECT t.id AS these_id,
             e.id AS etape_id,
             e.code,
             e.ordre
      FROM these t
               JOIN wf_etape e ON e.code::text = 'RDV_BU_SAISIE_BU'::text
      WHERE t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text])
      UNION ALL
      SELECT t.id AS these_id,
             e.id AS etape_id,
             e.code,
             e.ordre
      FROM these t
               JOIN wf_etape e ON e.code::text = 'RDV_BU_VALIDATION_BU'::text
      WHERE t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text])
      UNION ALL
      SELECT t.id AS these_id,
             e.id AS etape_id,
             e.code,
             e.ordre
      FROM these t
               JOIN wf_etape e ON e.code::text = 'DEPOT_VERSION_ORIGINALE_CORRIGEE'::text
      WHERE (t.correc_autorisee IS NOT NULL OR
             t.correc_autorisee_forcee IS NOT NULL AND t.correc_autorisee_forcee::text <> 'aucune'::text OR
             t.correc_effectuee::text = 'O'::text)
        AND (t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text]))
      UNION ALL
      SELECT t.id AS these_id,
             e.id AS etape_id,
             e.code,
             e.ordre
      FROM these t
               JOIN wf_etape e ON e.code::text = 'AUTORISATION_DIFFUSION_THESE_VERSION_CORRIGEE'::text
      WHERE (t.correc_autorisee IS NOT NULL OR
             t.correc_autorisee_forcee IS NOT NULL AND t.correc_autorisee_forcee::text <> 'aucune'::text OR
             t.correc_effectuee::text = 'O'::text)
        AND (t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text]))
      UNION ALL
      SELECT t.id AS these_id,
             e.id AS etape_id,
             e.code,
             e.ordre
      FROM these t
               JOIN wf_etape e ON e.code::text = 'ATTESTATIONS_VERSION_CORRIGEE'::text
      WHERE (t.correc_autorisee IS NOT NULL OR
             t.correc_autorisee_forcee IS NOT NULL AND t.correc_autorisee_forcee::text <> 'aucune'::text OR
             t.correc_effectuee::text = 'O'::text)
        AND (t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text]))
      UNION ALL
      SELECT t.id AS these_id,
             e.id AS etape_id,
             e.code,
             e.ordre
      FROM these t
               JOIN wf_etape e ON e.code::text = 'ARCHIVABILITE_VERSION_ORIGINALE_CORRIGEE'::text
      WHERE (t.correc_autorisee IS NOT NULL OR
             t.correc_autorisee_forcee IS NOT NULL AND t.correc_autorisee_forcee::text <> 'aucune'::text OR
             t.correc_effectuee::text = 'O'::text)
        AND (t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text]))
      UNION ALL
      SELECT t.id AS these_id,
             e.id AS etape_id,
             e.code,
             e.ordre
      FROM these t
               JOIN wf_etape e ON e.code::text = 'DEPOT_VERSION_ARCHIVAGE_CORRIGEE'::text
               JOIN v_situ_archivab_voc situ ON situ.these_id = t.id AND situ.est_valide = false
      WHERE (t.correc_autorisee IS NOT NULL OR
             t.correc_autorisee_forcee IS NOT NULL AND t.correc_autorisee_forcee::text <> 'aucune'::text OR
             t.correc_effectuee::text = 'O'::text)
        AND (t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text]))
      UNION ALL
      SELECT t.id AS these_id,
             e.id AS etape_id,
             e.code,
             e.ordre
      FROM these t
               JOIN wf_etape e ON e.code::text = 'ARCHIVABILITE_VERSION_ARCHIVAGE_CORRIGEE'::text
               JOIN v_situ_archivab_voc situ ON situ.these_id = t.id AND situ.est_valide = false
      WHERE (t.correc_autorisee IS NOT NULL OR
             t.correc_autorisee_forcee IS NOT NULL AND t.correc_autorisee_forcee::text <> 'aucune'::text OR
             t.correc_effectuee::text = 'O'::text)
        AND (t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text]))
      UNION ALL
      SELECT t.id AS these_id,
             e.id AS etape_id,
             e.code,
             e.ordre
      FROM these t
               JOIN wf_etape e ON e.code::text = 'VERIFICATION_VERSION_ARCHIVAGE_CORRIGEE'::text
               JOIN v_situ_archivab_vac situ ON situ.these_id = t.id AND situ.est_valide = true
      WHERE (t.correc_autorisee IS NOT NULL OR
             t.correc_autorisee_forcee IS NOT NULL AND t.correc_autorisee_forcee::text <> 'aucune'::text OR
             t.correc_effectuee::text = 'O'::text)
        AND (t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text]))
      UNION ALL
      SELECT t.id AS these_id,
             e.id AS etape_id,
             e.code,
             e.ordre
      FROM these t
               JOIN wf_etape e ON e.code::text = 'DEPOT_VERSION_CORRIGEE_VALIDATION_DOCTORANT'::text
      WHERE (t.correc_autorisee IS NOT NULL OR
             t.correc_autorisee_forcee IS NOT NULL AND t.correc_autorisee_forcee::text <> 'aucune'::text OR
             t.correc_effectuee::text = 'O'::text)
        AND (t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text]))
      UNION ALL
      SELECT t.id AS these_id,
             e.id AS etape_id,
             e.code,
             e.ordre
      FROM these t
               JOIN wf_etape e ON e.code::text = 'DEPOT_VERSION_CORRIGEE_VALIDATION_DIRECTEUR'::text
      WHERE (t.correc_autorisee IS NOT NULL OR
             t.correc_autorisee_forcee IS NOT NULL AND t.correc_autorisee_forcee::text <> 'aucune'::text OR
             t.correc_effectuee::text = 'O'::text)
        AND (t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text]))
      UNION ALL
      SELECT t.id AS these_id,
             e.id AS etape_id,
             e.code,
             e.ordre
      FROM these t
               JOIN wf_etape e ON e.code::text = 'REMISE_EXEMPLAIRE_PAPIER_THESE_CORRIGEE'::text
      WHERE (t.correc_autorisee IS NOT NULL OR
             t.correc_autorisee_forcee IS NOT NULL AND t.correc_autorisee_forcee::text <> 'aucune'::text OR
             t.correc_effectuee::text = 'O'::text)
        AND (t.etat_these::text = ANY (ARRAY ['E'::character varying::text, 'S'::character varying::text]))
        AND (EXISTS(SELECT d.id
                    FROM diffusion d
                    WHERE d.these_id = t.id
                      AND d.version_corrigee = true
                      AND (d.autoris_mel = ANY (ARRAY [0, 1]))))) alias38;
                      
```
 No newline at end of file
+3 −2
Original line number Diff line number Diff line
@@ -21,9 +21,10 @@ trait ShellCommandRunnerTrait
            }

            if (!$result->isSuccessfull()) {
                $message = sprintf("La commande '%s' a échoué (code retour = %s). ",
                $message = sprintf("La commande '%s' a échoué (code retour = %s) : %s",
                    $command->getName(),
                    $result->getReturnCode()
                    $result->getReturnCode(),
                    $command->getCommandLine()
                );
                if ($output = $result->getOutput()) {
                    $message .= "Voici le log d'exécution : " . implode(PHP_EOL, $output);
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ use Fichier\Command\MergeShellCommand;
 */
class PdfMergeShellCommandQpdf extends MergeShellCommand
{
    protected $executable = '/usr/local/bin/qpdf';
    protected $executable = 'qpdf';

    /**
     * @return string
+3 −1
Original line number Diff line number Diff line
@@ -436,10 +436,12 @@ class SessionController extends AbstractController
        foreach ($inscriptions as $inscription) {
            $doctorant = $inscription->getDoctorant();
            $theses = array_filter($doctorant->getTheses(), function (These $t) { return ($t->getEtatThese() === These::ETAT_EN_COURS AND $t->estNonHistorise());});
            /** @var These $these */
            $these = (!empty($theses))?current($theses):null;
            $etablissements = array_map(function (These $t) { return ($t->getEtablissement())?$t->getEtablissement()->getStructure()->getLibelle():"Établissement non renseigné";}, $theses);
            $ecoles = array_map(function (These $t) { return ($t->getEcoleDoctorale())?$t->getEcoleDoctorale()->getStructure()->getLibelle():"École doctorale non renseignée";}, $theses);
            $unites = array_map(function (These $t) { return ($t->getUniteRecherche())?$t->getUniteRecherche()->getStructure()->getLibelle():"Unité de recherche non renseignée";}, $theses);
            $nbInscription = (!empty($theses))?current($theses)->getNbInscription($annee):"---";
            $nbInscription = ($these)?$these->getNbInscription():"---";
            $entry = [
                'Liste' => $inscription->getListe(),
                'Dénomination étudiant' => $doctorant->getIndividu()->getNomComplet(),
Loading