Commit 6bf45d82 authored by Mathieu's avatar Mathieu
Browse files

feat/#16379 : Elimination date based on the last deposit

parent b7c5f7b1
Pipeline #11262 failed with stages
in 42 seconds
......@@ -351,75 +351,75 @@ INSERT INTO "recordsManagement"."retentionRule" ("code","duration","finalDisposi
('GES', 'P5Y', 'destruction', 'Documents de gestion', 'Documents de gestion', NULL)
;
INSERT INTO "recordsManagement"."archivalProfile" ("archivalProfileId","reference","name","descriptionSchema","descriptionClass","retentionStartDate","retentionRuleCode","description","accessRuleCode","acceptUserIndex","acceptArchiveWithoutProfile","fileplanLevel","processingStatuses") VALUES
('1', 'COUA', 'Courrier Administratif', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('2', 'PRVN', 'Procès-Verbal de Négociation', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('3', 'PRVIF', 'Procès-verbal à Incidence Financière', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('4', 'ETAR', 'État de Rapprochement', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('5', 'RELCC', 'Relevé de Contrôle de Caisse', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('6', 'CTRF', 'Contrat Fournisseur', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('7', 'DCLTVA', 'Déclaration de TVA', NULL, NULL, 'originatingDate', 'IMP', NULL, NULL, true, true, 'file', NULL),
('8', 'QUTP', 'Quittance de Paiement', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('9', 'FICIC', 'Fiche d''Imputation Comptable', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('10', 'FACJU', 'Facture Justificative', NULL, NULL, 'originatingDate', 'COM', NULL, NULL, true, true, 'item', NULL),
('11', 'FICREC', 'Fiche Récapitulative', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('12', 'DOSC', 'Dossiers Caisse', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'file', NULL),
('13', 'PIECD', 'Pièce de Caisse-Dépense', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('14', 'PIEJ', 'Pièce Justificative', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('15', 'DOSB', 'Dossiers Banque', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'file', NULL),
('16', 'PIEBD', 'Pièce de Banque-Dépense', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('17', 'FICDG', 'Fiche DG', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('18', 'NOTSER', 'Note de service', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('19', 'PM', 'Passation de marché', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'file', NULL),
('20', 'BORT', 'Bordereau de transmission', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('21', 'COUNM', 'Courrier de notification de marché', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('22', 'PRVA', 'Procès-Verbal d''Attribution', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('23', 'PRVOP', 'Proces-Verbal d''Ouverture des Plis', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('24', 'RAPEO', 'Rapport d’Évaluation des Offres', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('26', 'DEMC', 'Demande de Cotation', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('27', 'RAPFOR', 'Rapport de Formation', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('28', 'DOSIP', 'Dossier Individuel du Personnel', NULL, NULL, 'originatingDate', 'DIP', NULL, NULL, true, true, 'file', NULL),
('29', 'ETAC', 'Etat Civil', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('30', 'CURV', 'Curriculum Vitae', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('31', 'EXTAN', 'Extrait d''Acte de Naissance', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('33', 'CASJU', 'Casier Judiciaire', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('34', 'ATTSU', 'Attestation de succès', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('35', 'CTRTRV', 'Contrat de Travail', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('37', 'ATTT', 'Attestation de Travail', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('39', 'CNSS', 'Caisse Nationale de Sécurité Sociale', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('41', 'CAR', 'Carrière', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('42', 'DECIN', 'Décision de nomination', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('43', 'DECIR', 'Décision de redéploiement', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('47', 'ATTF', 'Attestation de formation', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('53', 'COURRN', 'Courrier Répartition du Résultat Net', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('54', 'COUDS', 'Courrier Domiciliation de Salaire', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('55', 'FICP', 'Fiche de Poste', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('56', 'FICF', 'Fiche de Fonction', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('57', 'DEMA', 'Demandes Administratives', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('58', 'COUAA', 'Courrier Autorisation d''Absence', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('59', 'COUCA', 'Courrier Congés Administratifs', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('60', 'COUDE', 'Courrier Demande d''Emploi', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('61', 'DOSETU', 'Dossier de Synthèse et d’Étude', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'file', NULL),
('62', 'FICRM', 'Fiche de Remontée Mensuelle', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('63', 'RAPT', 'Rapport Trimestriel', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('64', 'RAPMOE', ' Rapport de Mise en Œuvre', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('65', 'RAPA', 'Rapport d''Activité', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('66', 'RAPSE', 'Rapport de Suivi et Évaluation', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('67', 'RAPGES', 'Rapport de Gestion', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('68', 'TDRE', 'Termes de Références des Études', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('69', 'DCRN', 'Décret de Nomination', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('70', 'FICCR', 'Fiche de compte rendu', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('71', 'LETC', 'Lettre circulaire', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('72', 'FICI', 'Fiche d''instruction', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('73', 'RAPAMI', 'Rapport d''Audit et Missions Internes', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('74', 'RAPAE', 'Rapport d''Audit Externe', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('75', 'RAPER', 'Rapport d’Études et Recherches', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('76', 'COUABID', 'Courrier Arrivée BID', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('77', 'SMIROP', 'Fiche de visite SMIROP', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('78', 'VISA', 'Visas obtenus', NULL, NULL, 'originatingDate', NULL, NULL, NULL, true, true, 'item', NULL),
('79', 'FACVEN', 'Facture de vente', NULL, NULL, 'originatingDate', 'COM', NULL, NULL, true, true, 'item', NULL),
('80', 'FACACH', 'Facture d''achat', NULL, NULL, 'description/dueDate', 'COM', NULL, NULL, true, false, 'item', '{"NEW": {"type": "initial", "label": "Nouvelle(s) facture(s)", "actions": {"qualify": {}, "cancelQualify": {}}, "default": true, "position": 0, "filterUserAccess": false}, "PAYED": {"type": "final", "label": "Payée", "actions": {}, "default": false, "position": 6, "filterUserAccess": false}, "APPROVED": {"type": "intermediate", "label": "À payer", "actions": {"pay": {}, "updateMetadata": {}}, "default": false, "position": 5, "filterUserAccess": true}, "REJECTED": {"type": "intermediate", "label": "Rejetée(s)", "actions": {"sendValidation": {}, "updateMetadata": {}, "sendToApprobation": {}}, "default": false, "position": 3, "filterUserAccess": true}, "CANCELLED": {"type": "final", "label": "Annulée", "actions": {}, "default": false, "position": 7, "filterUserAccess": false}, "QUALIFIED": {"type": "intermediate", "label": "À valider", "actions": {"reject": {}, "redirect": {}, "validate": {}}, "default": false, "position": 1, "filterUserAccess": true}, "VALIDATED": {"type": "intermediate", "label": "À approuver", "actions": {"reject": {}, "approve": {}}, "default": false, "position": 4, "filterUserAccess": true}, "MISQUALIFIED": {"type": "intermediate", "label": "À requalifier", "actions": {"qualify": {}}, "default": false, "position": 2, "filterUserAccess": true}}'),
('81', 'BULPAI', 'Bulletins de paie', NULL, NULL, NULL, 'BULPAI', NULL, NULL, false, false, 'item', '{}')
INSERT INTO "recordsManagement"."archivalProfile" ("archivalProfileId","reference","name","descriptionSchema","descriptionClass","retentionStartDate","isRetentionLastDeposit","retentionRuleCode","description","accessRuleCode","acceptUserIndex","acceptArchiveWithoutProfile","fileplanLevel","processingStatuses") VALUES
('1', 'COUA', 'Courrier Administratif', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('2', 'PRVN', 'Procès-Verbal de Négociation', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('3', 'PRVIF', 'Procès-verbal à Incidence Financière', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('4', 'ETAR', 'État de Rapprochement', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('5', 'RELCC', 'Relevé de Contrôle de Caisse', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('6', 'CTRF', 'Contrat Fournisseur', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('7', 'DCLTVA', 'Déclaration de TVA', NULL, NULL, 'originatingDate', false, 'IMP', NULL, NULL, true, true, 'file', NULL),
('8', 'QUTP', 'Quittance de Paiement', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('9', 'FICIC', 'Fiche d''Imputation Comptable', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('10', 'FACJU', 'Facture Justificative', NULL, NULL, 'originatingDate', false, 'COM', NULL, NULL, true, true, 'item', NULL),
('11', 'FICREC', 'Fiche Récapitulative', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('12', 'DOSC', 'Dossiers Caisse', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'file', NULL),
('13', 'PIECD', 'Pièce de Caisse-Dépense', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('14', 'PIEJ', 'Pièce Justificative', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('15', 'DOSB', 'Dossiers Banque', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'file', NULL),
('16', 'PIEBD', 'Pièce de Banque-Dépense', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('17', 'FICDG', 'Fiche DG', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('18', 'NOTSER', 'Note de service', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('19', 'PM', 'Passation de marché', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'file', NULL),
('20', 'BORT', 'Bordereau de transmission', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('21', 'COUNM', 'Courrier de notification de marché', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('22', 'PRVA', 'Procès-Verbal d''Attribution', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('23', 'PRVOP', 'Proces-Verbal d''Ouverture des Plis', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('24', 'RAPEO', 'Rapport d’Évaluation des Offres', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('26', 'DEMC', 'Demande de Cotation', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('27', 'RAPFOR', 'Rapport de Formation', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('28', 'DOSIP', 'Dossier Individuel du Personnel', NULL, NULL, 'originatingDate', false, 'DIP', NULL, NULL, true, true, 'file', NULL),
('29', 'ETAC', 'Etat Civil', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('30', 'CURV', 'Curriculum Vitae', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('31', 'EXTAN', 'Extrait d''Acte de Naissance', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('33', 'CASJU', 'Casier Judiciaire', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('34', 'ATTSU', 'Attestation de succès', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('35', 'CTRTRV', 'Contrat de Travail', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('37', 'ATTT', 'Attestation de Travail', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('39', 'CNSS', 'Caisse Nationale de Sécurité Sociale', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('41', 'CAR', 'Carrière', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('42', 'DECIN', 'Décision de nomination', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('43', 'DECIR', 'Décision de redéploiement', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('47', 'ATTF', 'Attestation de formation', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('53', 'COURRN', 'Courrier Répartition du Résultat Net', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('54', 'COUDS', 'Courrier Domiciliation de Salaire', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('55', 'FICP', 'Fiche de Poste', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('56', 'FICF', 'Fiche de Fonction', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('57', 'DEMA', 'Demandes Administratives', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('58', 'COUAA', 'Courrier Autorisation d''Absence', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('59', 'COUCA', 'Courrier Congés Administratifs', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('60', 'COUDE', 'Courrier Demande d''Emploi', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('61', 'DOSETU', 'Dossier de Synthèse et d’Étude', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'file', NULL),
('62', 'FICRM', 'Fiche de Remontée Mensuelle', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('63', 'RAPT', 'Rapport Trimestriel', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('64', 'RAPMOE', ' Rapport de Mise en Œuvre', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('65', 'RAPA', 'Rapport d''Activité', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('66', 'RAPSE', 'Rapport de Suivi et Évaluation', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('67', 'RAPGES', 'Rapport de Gestion', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('68', 'TDRE', 'Termes de Références des Études', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('69', 'DCRN', 'Décret de Nomination', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('70', 'FICCR', 'Fiche de compte rendu', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('71', 'LETC', 'Lettre circulaire', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('72', 'FICI', 'Fiche d''instruction', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('73', 'RAPAMI', 'Rapport d''Audit et Missions Internes', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('74', 'RAPAE', 'Rapport d''Audit Externe', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('75', 'RAPER', 'Rapport d’Études et Recherches', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('76', 'COUABID', 'Courrier Arrivée BID', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('77', 'SMIROP', 'Fiche de visite SMIROP', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('78', 'VISA', 'Visas obtenus', NULL, NULL, 'originatingDate', false, NULL, NULL, NULL, true, true, 'item', NULL),
('79', 'FACVEN', 'Facture de vente', NULL, NULL, 'originatingDate', false, 'COM', NULL, NULL, true, true, 'item', NULL),
('80', 'FACACH', 'Facture d''achat', NULL, NULL, 'description/dueDate', false, 'COM', NULL, NULL, true, false, 'item', '{"NEW": {"type": "initial", "label": "Nouvelle(s) facture(s)", "actions": {"qualify": {}, "cancelQualify": {}}, "default": true, "position": 0, "filterUserAccess": false}, "PAYED": {"type": "final", "label": "Payée", "actions": {}, "default": false, "position": 6, "filterUserAccess": false}, "APPROVED": {"type": "intermediate", "label": "À payer", "actions": {"pay": {}, "updateMetadata": {}}, "default": false, "position": 5, "filterUserAccess": true}, "REJECTED": {"type": "intermediate", "label": "Rejetée(s)", "actions": {"sendValidation": {}, "updateMetadata": {}, "sendToApprobation": {}}, "default": false, "position": 3, "filterUserAccess": true}, "CANCELLED": {"type": "final", "label": "Annulée", "actions": {}, "default": false, "position": 7, "filterUserAccess": false}, "QUALIFIED": {"type": "intermediate", "label": "À valider", "actions": {"reject": {}, "redirect": {}, "validate": {}}, "default": false, "position": 1, "filterUserAccess": true}, "VALIDATED": {"type": "intermediate", "label": "À approuver", "actions": {"reject": {}, "approve": {}}, "default": false, "position": 4, "filterUserAccess": true}, "MISQUALIFIED": {"type": "intermediate", "label": "À requalifier", "actions": {"qualify": {}}, "default": false, "position": 2, "filterUserAccess": true}}'),
('81', 'BULPAI', 'Bulletins de paie', NULL, NULL, NULL, false, 'BULPAI', NULL, NULL, false, false, 'item', '{}')
;
INSERT INTO "recordsManagement"."archivalProfileContents" ("parentProfileId","containedProfileId") VALUES
......
-- Migration script for PGSQL from Maarch RM V2.7 to V2.8
ALTER TABLE "recordsManagement"."archivalProfile" ADD COLUMN "isRetentionLastDeposit" boolean default false;
......@@ -265,6 +265,7 @@ class archivalProfile
*/
public function update($archivalProfile)
{
$transactionControl = !$this->sdoFactory->inTransaction();
if ($transactionControl) {
......
......@@ -20,7 +20,8 @@
namespace bundle\recordsManagement\Controller;
use function laabs\hash_stream;
use function laabs\hash_stream,
archiveAccessTrait;
/**
* Archive entry controller
......@@ -78,6 +79,7 @@ trait archiveEntryTrait
*/
public function receive($archive, $zipContainer = false)
{
if ($zipContainer) {
$archive = \laabs::cast($archive, 'recordsManagement/archive');
$zipResource = $archive->digitalResources[0];
......@@ -779,6 +781,18 @@ trait archiveEntryTrait
}
/**
* Check a parentArchive retention rule
*
* @param recordsManagement/archive $archive The archive to receive
*/
public function checkRetentionRule($archive) {
if($this->archivalProfileController->getByReference($archive->archivalProfileReference)) {
$archive->retentionStartDate = \laabs::newTimestamp();
$archive->disposalDate = $archive->retentionStartDate->shift($archive->retentionDuration);
}
}
/**
* Deposit a new archive
*
......@@ -850,6 +864,7 @@ trait archiveEntryTrait
if (!empty($archive->parentArchiveId)) {
$parentArchive = $this->sdoFactory->read('recordsManagement/archive', $archive->parentArchiveId);
$parentArchive->lastModificationDate = \laabs::newTimestamp();
$this->checkRetentionRule($parentArchive);
$this->sdoFactory->update($parentArchive, 'recordsManagement/archive');
}
}
......
......@@ -78,6 +78,13 @@ class archivalProfile
*/
public $retentionStartDate;
/**
* The starting date of the retention rule calculation is from last deposit
*
* @var boolean
*/
public $isRetentionLastDeposit;
/**
* The retention rule code
*
......
......@@ -81,6 +81,13 @@ class archivalProfile
*/
public $retentionStartDate;
/**
* The starting date of the retention rule calculation is from last deposit
*
* @var boolean
*/
public $isRetentionLastDeposit;
/**
* The retention rule code
*
......
......@@ -52,6 +52,7 @@ CREATE TABLE "recordsManagement"."archivalProfile"
"descriptionSchema" text,
"descriptionClass" text,
"retentionStartDate" text,
"isRetentionLastDeposit" boolean,
"retentionRuleCode" text ,
"description" text,
"accessRuleCode" text,
......
......@@ -274,3 +274,6 @@ msgstr "Lecture seule"
msgid "View in the list"
msgstr "Voir dans la liste"
msgid "Update when an item is added"
msgstr "Mettre à jour au versement d'une pièce"
......@@ -203,11 +203,14 @@ file that was distributed with this source code.
descriptionClass: $('#descriptionClass').val(),
retentionStartDate: $('#startDate option:selected').val(),
description: $('#description').val(),
isRetentionLastDeposit: $('#isRetentionLastDepositToggle').prop("checked"),
accessRuleCode: $('#accessRuleCode').val(),
retentionRuleCode: $('#code').val(),
acceptUserIndex: $('#allowUserIndexes').prop("checked"),
archiveDescription: []
}
console.log(serializedObject);
//Cas d'extension Workflow
if ($("#workflowTab").length != 0) {
serializedObject.processingStatuses = {};
......
......@@ -40,6 +40,13 @@
</select>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Reference date matches last deposit</label>
<div class="col-md-9">
<input type="checkbox" name="isRetentionLastDeposit" id="isRetentionLastDepositToggle" data-toggle="toggle" value="[?merge .isRetentionLastDeposit ?]">
</div>
</div>
</div>
<div class="col-xs-12" style="border-top: 1px solid silver">
<br />
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment