From 43283048f6020565978073f88cba736b08dad024 Mon Sep 17 00:00:00 2001 From: Alexandre Goldstein Date: Tue, 11 May 2021 14:33:18 +0200 Subject: [PATCH 1/8] Merge branch 'fix/17037_fix_groupBy_operation_type_to_develop' into 'develop' fix/17037 : fix typo in variable name and modify event json column number for originator type See merge request maarch/maarchRM!664 --- src/bundle/Statistics/Controller/Statistics.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bundle/Statistics/Controller/Statistics.php b/src/bundle/Statistics/Controller/Statistics.php index e1233e859..fd9b91c51 100644 --- a/src/bundle/Statistics/Controller/Statistics.php +++ b/src/bundle/Statistics/Controller/Statistics.php @@ -196,7 +196,7 @@ class Statistics foreach ($directStats as $groupBy => $result) { $groupByFound = false; for ($i = 0; $i < count($stats); $i++) { - if ($stats[$i][$filter] == $groupby) { + if ($stats[$i][$filter] == $groupBy) { if ($resultType == 'sum') { $result1 = floatval(str_replace(" ", "", $stats[$i][$resultType])); $result2 = floatval(str_replace(" ", "", $result)); @@ -716,7 +716,7 @@ EOT; ? ' LEFT JOIN "recordsManagement"."archivalProfile" "archivalProfile" ON "archivalProfile"."reference" = "event"."eventInfo"::json->>10' : ' INNER JOIN "organization"."organization" "organization" - ON "organization"."registrationNumber" = "event"."eventInfo"::json->>6'; + ON "organization"."registrationNumber" = "event"."eventInfo"::json->>4'; } $query = 'SELECT '.($groupBy ? $selectCondition . ' AS "'.$groupBy.'", ' : '').'SUM(CAST(COALESCE(NULLIF("event"."eventInfo"::json->>'.$jsonSizeColumnNumber.', \'\'), \'0\') AS INTEGER)) @@ -766,7 +766,7 @@ EOT; ? ' LEFT JOIN "recordsManagement"."archivalProfile" "archivalProfile" ON "archivalProfile"."reference" = "event"."eventInfo"::json->>10' : ' INNER JOIN "organization"."organization" "organization" - ON "organization"."registrationNumber" = "event"."eventInfo"::json->>6'; + ON "organization"."registrationNumber" = "event"."eventInfo"::json->>4'; } $query = 'SELECT '.($groupBy ? $selectCondition . ' AS "'.$groupBy.'", ' : '').'COUNT("event"."eventId") -- GitLab From f61ac1a1bcdcb866d11fca462c1230f6857035b8 Mon Sep 17 00:00:00 2001 From: Jerome Boucher Date: Thu, 20 May 2021 14:55:55 +0200 Subject: [PATCH 2/8] Merge branch 'fix/16919_fix_datetime_metadata_input_to_develop' into 'develop' Fix/16919 fix datetime metadata input to develop See merge request maarch/maarchRM!667 --- dependency/html/Document.php | 6 +++--- .../dashboard/mainScreen/descriptionForm.html | 2 +- .../view/dashboard/mainScreen/folder.html | 1 - .../bootstrap-datetimepicker.js | 20 +++++++++---------- 4 files changed, 14 insertions(+), 15 deletions(-) diff --git a/dependency/html/Document.php b/dependency/html/Document.php index c33e34543..a2a614022 100755 --- a/dependency/html/Document.php +++ b/dependency/html/Document.php @@ -283,8 +283,8 @@ class Document extends \dependency\xml\Document // $this->addScript("/public/js/moment_2.14.1/moment.js"); $this->addScript("/public/js/moment_2.14.1/moment.min.js"); - // $this->addScript("/public/js/dateTimePicker/bootstrap-datetimepicker.js"); - $this->addScript("/public/js/dateTimePicker/bootstrap-datetimepicker.min.js"); + $this->addScript("/public/js/dateTimePicker/bootstrap-datetimepicker.js"); + // $this->addScript("/public/js/dateTimePicker/bootstrap-datetimepicker.min.js"); $this->addScript("/public/js/csrf/csrfprotector.js");//min version does not exists @@ -346,7 +346,7 @@ class Document extends \dependency\xml\Document public function addContent($content, $container = false) { $contentFragment = $this->addFragment($content); - + if (!$container) { $container = $this->getContainer(); } diff --git a/src/presentation/maarchRM/Resources/view/dashboard/mainScreen/descriptionForm.html b/src/presentation/maarchRM/Resources/view/dashboard/mainScreen/descriptionForm.html index 498e58dba..b658cdadf 100755 --- a/src/presentation/maarchRM/Resources/view/dashboard/mainScreen/descriptionForm.html +++ b/src/presentation/maarchRM/Resources/view/dashboard/mainScreen/descriptionForm.html @@ -370,7 +370,6 @@ input:invalid { field.attr('placeholder', $('#date_text').text()); parent.append(field); - if (descriptionField.format == 'datetime') { field.data('format', 'datetime'); field.datetimepicker(dateTimePickerParams); @@ -934,6 +933,7 @@ input:invalid { data = data.replace('T', ' '); field.data('DateTimePicker').format('YYYY-MM-DD HH:mm:ss'); field.data('DateTimePicker').date(data) + field.data('DateTimePicker').format('YYYY-MM-DD HH:mm:ss'); } else { data = new Date(data).toLocaleDateString("[?merge locale ?]").replace(/\//g, "-"); field.datepicker('setDate', data); diff --git a/src/presentation/maarchRM/Resources/view/dashboard/mainScreen/folder.html b/src/presentation/maarchRM/Resources/view/dashboard/mainScreen/folder.html index 8670613f6..7bd52d932 100755 --- a/src/presentation/maarchRM/Resources/view/dashboard/mainScreen/folder.html +++ b/src/presentation/maarchRM/Resources/view/dashboard/mainScreen/folder.html @@ -452,7 +452,6 @@ NewArchive = { loadImportForm: function(e, profileMetadata) { - console.trace(); $('#folderContents').addClass('hide'); trigger('newArchiveForm.recordsManagement', [profileMetadata, ArchiveFolderList.orgRegNumber, ArchiveFolderList.folderId, e.data('parent-archive-id'), e.data('parent-archive-name')]); } diff --git a/web/public/js/dateTimePicker/bootstrap-datetimepicker.js b/web/public/js/dateTimePicker/bootstrap-datetimepicker.js index 8838cbcd2..753e437c0 100644 --- a/web/public/js/dateTimePicker/bootstrap-datetimepicker.js +++ b/web/public/js/dateTimePicker/bootstrap-datetimepicker.js @@ -328,7 +328,7 @@ getTemplate = function () { var template = $('
').addClass('bootstrap-datetimepicker-widget dropdown-menu'), - dateView = $('
').addClass('datepicker').append(getDatePickerTemplate()), + dateView = $('
').addClass('datepicker2').append(getDatePickerTemplate()), timeView = $('
').addClass('timepicker').append(getTimePickerTemplate()), content = $('
    ').addClass('list-unstyled'), toolbar = $('
  • ').addClass('picker-switch' + (options.collapse ? ' accordion-toggle' : '')).append(getToolbar()); @@ -497,7 +497,7 @@ if (dir) { currentViewMode = Math.max(minViewModeNumber, Math.min(3, currentViewMode + dir)); } - widget.find('.datepicker > div').hide().filter('.datepicker-' + datePickerModes[currentViewMode].clsName).show(); + widget.find('.datepicker2 > div').hide().filter('.datepicker-' + datePickerModes[currentViewMode].clsName).show(); }, fillDow = function () { @@ -2523,7 +2523,7 @@ return; } var d = this.date() || this.getMoment(); - if (widget.find('.datepicker').is(':visible')) { + if (widget.find('.datepicker2').is(':visible')) { this.date(d.clone().subtract(7, 'd')); } else { this.date(d.clone().add(this.stepping(), 'm')); @@ -2535,7 +2535,7 @@ return; } var d = this.date() || this.getMoment(); - if (widget.find('.datepicker').is(':visible')) { + if (widget.find('.datepicker2').is(':visible')) { this.date(d.clone().add(7, 'd')); } else { this.date(d.clone().subtract(this.stepping(), 'm')); @@ -2546,7 +2546,7 @@ return; } var d = this.date() || this.getMoment(); - if (widget.find('.datepicker').is(':visible')) { + if (widget.find('.datepicker2').is(':visible')) { this.date(d.clone().subtract(1, 'y')); } else { this.date(d.clone().add(1, 'h')); @@ -2557,7 +2557,7 @@ return; } var d = this.date() || this.getMoment(); - if (widget.find('.datepicker').is(':visible')) { + if (widget.find('.datepicker2').is(':visible')) { this.date(d.clone().add(1, 'y')); } else { this.date(d.clone().subtract(1, 'h')); @@ -2568,7 +2568,7 @@ return; } var d = this.date() || this.getMoment(); - if (widget.find('.datepicker').is(':visible')) { + if (widget.find('.datepicker2').is(':visible')) { this.date(d.clone().subtract(1, 'd')); } }, @@ -2577,7 +2577,7 @@ return; } var d = this.date() || this.getMoment(); - if (widget.find('.datepicker').is(':visible')) { + if (widget.find('.datepicker2').is(':visible')) { this.date(d.clone().add(1, 'd')); } }, @@ -2586,7 +2586,7 @@ return; } var d = this.date() || this.getMoment(); - if (widget.find('.datepicker').is(':visible')) { + if (widget.find('.datepicker2').is(':visible')) { this.date(d.clone().subtract(1, 'M')); } }, @@ -2595,7 +2595,7 @@ return; } var d = this.date() || this.getMoment(); - if (widget.find('.datepicker').is(':visible')) { + if (widget.find('.datepicker2').is(':visible')) { this.date(d.clone().add(1, 'M')); } }, -- GitLab From db7bba4f744ef6eb5fcd5b38b2244aa54b8cecd9 Mon Sep 17 00:00:00 2001 From: Jerome Boucher Date: Thu, 20 May 2021 14:56:10 +0200 Subject: [PATCH 3/8] Merge branch 'fix/16927_authorization_schema_sql' into 'develop' Fix/16927 authorization schema sql See merge request maarch/maarchRM!666 --- src/bundle/medona/Resources/sql/schema.pgsql.sql | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/bundle/medona/Resources/sql/schema.pgsql.sql b/src/bundle/medona/Resources/sql/schema.pgsql.sql index f48e1690b..cc6a32b84 100644 --- a/src/bundle/medona/Resources/sql/schema.pgsql.sql +++ b/src/bundle/medona/Resources/sql/schema.pgsql.sql @@ -1,7 +1,6 @@ DROP SCHEMA IF EXISTS "medona" CASCADE; -CREATE SCHEMA "medona" - AUTHORIZATION postgres; +CREATE SCHEMA "medona"; -- Table: "medona"."archivalAgreement" -- GitLab From f0c93ce7e2dbcca58348e6da65f545875895cf80 Mon Sep 17 00:00:00 2001 From: Jerome Boucher Date: Thu, 20 May 2021 14:59:16 +0200 Subject: [PATCH 4/8] Merge branch 'fix/16917_missing_front_indicator_for_required_field' into 'develop' fix/16917 : fix archivalProfile miising information displayed See merge request maarch/maarchRM!665 --- .../maarchRM/Presenter/recordsManagement/welcome.php | 3 ++- .../Resources/view/dashboard/mainScreen/descriptionForm.html | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/presentation/maarchRM/Presenter/recordsManagement/welcome.php b/src/presentation/maarchRM/Presenter/recordsManagement/welcome.php index 66b0e034b..254f072d3 100755 --- a/src/presentation/maarchRM/Presenter/recordsManagement/welcome.php +++ b/src/presentation/maarchRM/Presenter/recordsManagement/welcome.php @@ -115,7 +115,8 @@ class welcome $archiveDescriptions = \laabs::callService('recordsManagement/archivalProfile/readByreference_reference_', $archivalProfile->reference)->archiveDescription; $archivalProfiles[$key]->archiveDescription = $archiveDescriptions; $archivalProfiles[$key]->searchFields = []; - foreach ($archivalProfile->archiveDescription as $archiveDescription) { + foreach ($archivalProfile->archiveDescription as $k => $archiveDescription) { + $archivalProfiles[$key]->archiveDescription[$k]->readonly = $archiveDescription->isImmutable; switch ($archiveDescription->descriptionField->type) { case 'text': case 'name': diff --git a/src/presentation/maarchRM/Resources/view/dashboard/mainScreen/descriptionForm.html b/src/presentation/maarchRM/Resources/view/dashboard/mainScreen/descriptionForm.html index b658cdadf..7d520714f 100755 --- a/src/presentation/maarchRM/Resources/view/dashboard/mainScreen/descriptionForm.html +++ b/src/presentation/maarchRM/Resources/view/dashboard/mainScreen/descriptionForm.html @@ -238,6 +238,8 @@ input:invalid { addArchiveDescription : function(archiveDescription) { var descriptionField = archiveDescription.descriptionField; + descriptionField.required = archiveDescription.required; + descriptionField.readonly = archiveDescription.readonly; var target = $("#archivalProfileFields"); var formGroup = Metadata.getFormGroup(descriptionField); target.append(formGroup); -- GitLab From bd64589078cbec600a8e315907e8271e8a73a382 Mon Sep 17 00:00:00 2001 From: Alexandre Goldstein Date: Tue, 11 May 2021 14:35:03 +0200 Subject: [PATCH 5/8] Merge branch 'fix/16868_unexpected_log_return_in_search' into 'develop' fix/16868 : add try/catch when no logs are retrieved in log search See merge request maarch/maarchRM!663 --- src/bundle/recordsManagement/Controller/log.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/bundle/recordsManagement/Controller/log.php b/src/bundle/recordsManagement/Controller/log.php index a75ef70d6..ac5cb3f4f 100755 --- a/src/bundle/recordsManagement/Controller/log.php +++ b/src/bundle/recordsManagement/Controller/log.php @@ -222,12 +222,21 @@ class log implements archiveDescriptionInterface } } + if (!is_null($description)) { + $queryString .= $description; + } + $archiveController = \laabs::newController('recordsManagement/archive'); $archives = []; $sortBy = ">fromDate"; - $logs = $this->sdoFactory->find("recordsManagement/log", $queryString, [], $sortBy, 0, $maxResults); + try { + $logs = $this->sdoFactory->find("recordsManagement/log", $queryString, [], $sortBy, 0, $maxResults); + } catch (\Exception $e) { + return []; + } + foreach ($logs as $log) { try { -- GitLab From f73a8012d41e4e92caa0894d4d98b39eeae83e06 Mon Sep 17 00:00:00 2001 From: Jerome_maarch Date: Fri, 21 May 2021 09:15:57 +0200 Subject: [PATCH 6/8] update version number --- VERSION.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.md b/VERSION.md index e2bdf6e45..a4dd9dba4 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -2.7.3 \ No newline at end of file +2.7.4 -- GitLab From cda2da971bb5b92f199295c535babdd737b2b10b Mon Sep 17 00:00:00 2001 From: Jerome_maarch Date: Fri, 21 May 2021 09:29:55 +0200 Subject: [PATCH 7/8] update changelog for 2.7.4 --- CHANGELOG.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08fb4602d..e3070547c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # CHANGELOG +## Version 2.7.4 + - `Fixed` Mauvaise ventilation par profil d'archive et service producteur dans l'onglet statistique + - `Fixed` Impossibilité de sauvegarder des métadonnées de type datetime via l'écran + - `Fixed` Champs obligatoires n'apparaissent plus lors de l'ajout/modification des métadonnées + - `Fixed` Mauvais retour lors de la recherche sur les champs description + - `Changed` Modification de l'utilisateur attribué lors de la création du schéma medona + ## Version 2.7.3 - `Fixed` Actualisation lors du changement d'organisation après connexion. - `Added` Prise en compte de l'ajout d'une référence à une archive parente lors du versement d'un bordereau MADES. @@ -25,7 +32,7 @@ - `Fixed` Calcul de la prochaine exécution mêmeen cas d'erreur dans le planificateur de tâches. - `Fixed` Affichage du compte de service en charge d'exécuter la tâche dans le planificateur de tâches. - `Fixed` Restauration du fichier permettant la génération de la doc OPENAPI. -- `Fixed` Correction du bug de déconnexion intempestive lors du changement d'organisation d'appartenance. +- `Fixed` Correction du bug de déconnexion intempestive lors du changement d'organisation d'appartenance. - `Fixed` Amélioration de la détection de l'algorithme de hash sur les bordereaux externes. - `Fixed` Correction du bug lors de la modification des paramètres d'un cluster de stockage. - `Fixed` Correction de l'affichage de la prévisualisation de certains PDF. -- GitLab From dd73ddc21486f73c523aeb8b840048db6e953994 Mon Sep 17 00:00:00 2001 From: AGO Date: Wed, 26 May 2021 14:04:34 +0200 Subject: [PATCH 8/8] fix moment.js import --- dependency/html/Document.php | 4 ++-- .../Resources/view/dashboard/mainScreen/descriptionForm.html | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dependency/html/Document.php b/dependency/html/Document.php index a2a614022..9d8e1c2ea 100755 --- a/dependency/html/Document.php +++ b/dependency/html/Document.php @@ -280,8 +280,8 @@ class Document extends \dependency\xml\Document $this->addScript("/public/js/datePicker/bootstrap-datepicker.js"); //min version does not exists // monment - // $this->addScript("/public/js/moment_2.14.1/moment.js"); - $this->addScript("/public/js/moment_2.14.1/moment.min.js"); + $this->addScript("/public/js/moment_2.14.1/moment.js"); + //$this->addScript("/public/js/moment_2.14.1/moment.min.js"); $this->addScript("/public/js/dateTimePicker/bootstrap-datetimepicker.js"); // $this->addScript("/public/js/dateTimePicker/bootstrap-datetimepicker.min.js"); diff --git a/src/presentation/maarchRM/Resources/view/dashboard/mainScreen/descriptionForm.html b/src/presentation/maarchRM/Resources/view/dashboard/mainScreen/descriptionForm.html index 7d520714f..9ffffe856 100755 --- a/src/presentation/maarchRM/Resources/view/dashboard/mainScreen/descriptionForm.html +++ b/src/presentation/maarchRM/Resources/view/dashboard/mainScreen/descriptionForm.html @@ -933,7 +933,6 @@ input:invalid { field = target.find("input"); if (field.data('format') == 'datetime') { data = data.replace('T', ' '); - field.data('DateTimePicker').format('YYYY-MM-DD HH:mm:ss'); field.data('DateTimePicker').date(data) field.data('DateTimePicker').format('YYYY-MM-DD HH:mm:ss'); } else { -- GitLab