diff --git a/contrib/openldap/core-fd.schema b/contrib/openldap/core-fd.schema index 280c3353c5e53be658ae2c49dbb6f03f2178170f..4800378ccc72ed883702742b6fc51b8af1394073 100644 --- a/contrib/openldap/core-fd.schema +++ b/contrib/openldap/core-fd.schema @@ -303,8 +303,22 @@ attributetype ( 1.3.6.1.4.1.38414.89.1.2 NAME 'fdTasksSchedule' attributetype ( 1.3.6.1.4.1.38414.89.1.3 NAME 'fdTasksMailUsers' DESC 'Fusion Directory - Tasks Mail Users Recipient' EQUALITY caseExactMatch - SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 - SINGLE-VALUE ) + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 ) + +attributetype ( 1.3.6.1.4.1.38414.89.1.4 NAME 'fdTasksStatus' + DESC 'Fusion Directory - Task Status' + EQUALITY caseExactMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 ) + +attributetype ( 1.3.6.1.4.1.38414.89.1.5 NAME 'fdTasksEndDate' + DESC 'Fusion Directory - Task End Date' + EQUALITY caseExactMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 ) + +attributetype ( 1.3.6.1.4.1.38414.89.1.6 NAME 'fdTasksCreationDate' + DESC 'Fusion Directory - Task Start Date' + EQUALITY caseExactMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 ) ##### Classes ##### @@ -392,11 +406,11 @@ 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 ) - MAY ( fdTasksSchedule ) ) + MUST ( cn $ fdTasksStatus $ fdTasksCreationDate ) + MAY ( fdTasksSchedule $ fdTasksEndDate) ) objectclass (1.3.6.1.4.1.38414.89.2.2 NAME 'fdTasksMail' DESC 'FusionDirectory - Tasks objects Mail' SUP top AUXILIARY - MUST ( fdTasksMailObject ) - MAY ( fdTasksMailUsers) ) + MUST ( fdTasksMailObject ) + MAY ( fdTasksMailUsers ) ) diff --git a/plugins/addons/tasks/class_tasks.inc b/plugins/addons/tasks/class_tasks.inc index 46c510688bb2b7eda028ec25acf55cb66a12b0d5..73ec09b32525b821bb8166500315cd0323f7ba55 100644 --- a/plugins/addons/tasks/class_tasks.inc +++ b/plugins/addons/tasks/class_tasks.inc @@ -56,6 +56,8 @@ class tasks extends simplePlugin 'fdTasksSchedule', 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'), ] ], ]; diff --git a/plugins/addons/tasks/class_tasksColumn.inc b/plugins/addons/tasks/class_tasksColumn.inc index 66b742233aa3ecfce38d8561261f65701e72c59e..1e57764ec8a5370b17144db435e1163fbd0ba8e8 100644 --- a/plugins/addons/tasks/class_tasksColumn.inc +++ b/plugins/addons/tasks/class_tasksColumn.inc @@ -24,8 +24,13 @@ * Important that a "query method" must be defined in order to have the listing */ class tasksColumn extends Column - { + + function __construct (managementListing $parent, array $attributes = NULL, string $label = NULL) + { + parent::__construct($parent, ['supannRessourceEtatDate', 'supannRessourceEtat'], $label); + } + protected function renderSingleValue (ListingEntry $entry, string $value): string { if ($value == '') { @@ -53,10 +58,13 @@ class tasksColumn extends Column static function filterSchedule (): string { //A method retrieving the time set by the task + return ''; } static function filterStatus (): string { //A method retrieving the status of the task + return ''; } } + diff --git a/plugins/addons/tasks/class_tasksManagement.inc b/plugins/addons/tasks/class_tasksManagement.inc index f44badd829d26f6d147c3f60892f84894c9895cb..14e72b07164ca515dbc832c0a40c82a84f44085c 100644 --- a/plugins/addons/tasks/class_tasksManagement.inc +++ b/plugins/addons/tasks/class_tasksManagement.inc @@ -27,9 +27,11 @@ class tasksManagement extends management */ public static $columns = [ ['LinkColumn', ['attributes' => 'cn', 'label' => 'Tasks']], - ['tasksColumn', ['attributes' => 'TYPE', 'label' => 'Types']], - ['tasksColumn', ['attributes' => 'TIMESTAMP', 'label' => 'Schedule']], - ['tasksColumn', ['attributes' => 'STATUS', 'label' => 'Status']], + //below fdTasksMailObject must be change to have a type defined within task creation (new ldap attributes ?hidden) + ['Column', ['attributes' => 'fdTasksMailObject', 'label' => 'Types']], + ['Column', ['attributes' => 'fdTasksSchedule', 'label' => 'Schedule']], + //below fdTasksStatus attribute needs to be calculated based on the type of the task. + ['Column', ['attributes' => 'fdTasksStatus', 'label' => 'Status']], ['ActionsColumn', ['label' => 'Actions']], ];