From 569df31e16c54edcad7e1f3582ca78528a715af7 Mon Sep 17 00:00:00 2001 From: Thibault Dockx <thibault.dockx@fusiondirectory.org> Date: Thu, 6 Oct 2022 13:06:21 +0100 Subject: [PATCH] :sparkles: Feat(Tasks) - Adds time schedule Adds proper time schedule with proper attribute. Change of schema to adapt to this change. --- contrib/openldap/core-fd.schema | 10 ++++------ plugins/addons/tasks/class_tasks.inc | 9 ++++----- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/contrib/openldap/core-fd.schema b/contrib/openldap/core-fd.schema index 45f16705e..5fbdc63bf 100644 --- a/contrib/openldap/core-fd.schema +++ b/contrib/openldap/core-fd.schema @@ -293,12 +293,10 @@ attributetype ( 1.3.6.1.4.1.38414.89.1.1 NAME 'fdTasksMailObject' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE ) -attributetype ( 1.3.6.1.4.1.38414.89.1.2 NAME 'fdTasksSchedule' +attributetype ( 1.3.6.1.4.1.38414.89.1.2 NAME 'fdTasksScheduleDate' DESC 'Scheduling of the Task - required processed date' - EQUALITY generalizedTimeMatch - ORDERING generalizedTimeOrderingMatch - SINGLE-VALUE - SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 ) + EQUALITY caseExactIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) attributetype ( 1.3.6.1.4.1.38414.89.1.3 NAME 'fdTasksMailUsers' DESC 'Fusion Directory - Tasks Mail Users Recipient' @@ -417,7 +415,7 @@ objectclass ( 1.3.6.1.4.1.38414.88.2.5 NAME 'fdMailTemplateInvitations' objectclass (1.3.6.1.4.1.38414.89.2.1 NAME 'fdTasks' DESC 'FusionDirectory - Tasks objects' MUST ( cn $ fdTasksStatus $ fdTasksCreationDate ) - MAY ( fdTasksSchedule $ fdTasksEndDate) ) + MAY ( fdTasksScheduleDate $ fdTasksEndDate) ) objectclass (1.3.6.1.4.1.38414.89.2.2 NAME 'fdTasksMail' DESC 'FusionDirectory - Tasks objects Mail' diff --git a/plugins/addons/tasks/class_tasks.inc b/plugins/addons/tasks/class_tasks.inc index 73ec09b32..4c3d4849e 100644 --- a/plugins/addons/tasks/class_tasks.inc +++ b/plugins/addons/tasks/class_tasks.inc @@ -51,11 +51,10 @@ class tasks extends simplePlugin _('Task Name'), _('Name for this task'), 'cn', TRUE ), - new GeneralizedTimeDateAttribute( - _('Task Schedule'), _('Date when this task is required to be processed'), - 'fdTasksSchedule', FALSE, - '' - ), + new DateTimeAttribute( + _('Schedule'), '', + 'fdTasksScheduleDate', FALSE + ), new HiddenAttribute('fdTasksStatus', TRUE, '1', '', 'Status', 'Status of the task'), new HiddenAttribute('fdTasksCreationDate', TRUE, date("Y-m-d h:i:sa"), '', 'StartDate', 'Start Date And Time Of A Task'), ] -- GitLab