diff --git a/contrib/openldap/core-fd.schema b/contrib/openldap/core-fd.schema index c8429d3d40c021d55667914baa8bfa4663cc8356..d188a2a7efaf2c890c34be751fb77e09ff33ecd3 100644 --- a/contrib/openldap/core-fd.schema +++ b/contrib/openldap/core-fd.schema @@ -2,6 +2,8 @@ ## core-fd.schema - Needed by FusionDirectory for its basic fonctionnalities ## +# Last OID used : 1.3.6.1.4.1.38414.62.1.57 12/21/23 + ##### Attributes from gosa ###### attributetype ( 1.3.6.1.4.1.10098.1.1.12.30 NAME 'gosaGroupObjects' @@ -167,6 +169,11 @@ attributetype ( 1.3.6.1.4.1.38414.62.1.15 NAME 'fdTasksEndDate' EQUALITY caseExactMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 ) +attributetype ( 1.3.6.1.4.1.38414.62.1.57 NAME 'fdTasksLastExec' + DESC 'Fusion Directory - Time when tasks was last executed' + EQUALITY caseExactMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 ) + attributetype ( 1.3.6.1.4.1.38414.62.1.16 NAME 'fdTasksCreationDate' DESC 'Fusion Directory - Task Start Date' EQUALITY caseExactMatch @@ -341,7 +348,7 @@ attributetype ( 1.3.6.1.4.1.38414.62.1.43 NAME 'fdPluginManagerSupportDownloadUr SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) attributetype ( 1.3.6.1.4.1.38414.62.1.44 NAME 'fdPluginManagerInfoTags' - DESC 'FusionDirectory - Plugin Tag for identiy plugins goals' + DESC 'FusionDirectory - Plugin Tag for identity plugins goals' EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) @@ -476,7 +483,8 @@ objectclass ( 1.3.6.1.4.1.38414.62.2.5 NAME 'fdMailTemplateConf' objectclass (1.3.6.1.4.1.38414.62.2.6 NAME 'fdTasks' DESC 'FusionDirectory - Tasks objects' MUST ( cn $ fdTasksStatus $ fdTasksCreationDate ) - MAY ( fdTasksScheduleDate $ fdTasksEndDate $ fdTasksRepeatableSchedule $ fdTasksUpdatable $ fdTasksRepeatable ) ) + MAY ( fdTasksScheduleDate $ fdTasksEndDate $ fdTasksRepeatableSchedule $ fdTasksUpdatable $ fdTasksRepeatable + $ fdTasksLastExec)) objectclass (1.3.6.1.4.1.38414.62.2.7 NAME 'fdTasksMail' DESC 'FusionDirectory - Tasks objects Mail' diff --git a/plugins/configuration/tasks/class_tasks.inc b/plugins/configuration/tasks/class_tasks.inc index ccf98b0f053cb074803c36b5b0faa01f675f335b..eecd250c45ece57b5a971fc559f90cf6345c8222 100644 --- a/plugins/configuration/tasks/class_tasks.inc +++ b/plugins/configuration/tasks/class_tasks.inc @@ -57,6 +57,7 @@ class tasks extends simplePlugin ), new HiddenAttribute('fdTasksStatus', TRUE, '1', '', 'Status', 'Status of the task'), + new HiddenAttribute('fdTasksLastExec', FALSE, '', '', 'LastExec', 'Last exec date'), new HiddenAttribute('fdTasksCreationDate', TRUE, date("Y-m-d h:i:sa"), '', 'StartDate', 'Start Date And Time Of A Task'), ] ], @@ -108,4 +109,13 @@ class tasks extends simplePlugin $this->attributesAccess['fdSubTasksActivation']->setInLdap(FALSE); } + function save (): array + { + // Verification if the bool of activation is ticked and activate the last exec accordingly. + if ($this->fdSubTasksActivation == TRUE) { + $currentDateTime = date("Y-m-d h:i:sa", time()); + $this->fdTasksLastExec = $currentDateTime; + } + return parent::save(); + } }