Verified Commit e20e7b2a authored by dockx thibault's avatar dockx thibault
Browse files

:ambulance: Fix(Tasks) - OnlyNew Members errors

Only new members - fixed
Showing with 13 additions and 6 deletions
+13 -6
......@@ -148,9 +148,15 @@ class tasks extends simplePlugin
if (!empty($subTasks)) {
// Recuperate members DN from the ldap search.
foreach ($subTasks as $subTask) {
// Case of a DN passed but being locked.
if (!empty($subTask['fdTasksGranularDN'][0])) {
$membersDN[] = $subTask['fdTasksGranularDN'][0];
// For lifeCycle we check DN and for mailObject we check mail
switch ($attributeType) {
case 'fdTasksGranularDN':
$membersDN[] = $subTask['fdTasksGranularDN'][0];
break;
case 'fdTasksGranularMail':
$membersDN[] = $subTask['fdTasksGranularMail'][0];
break;
}
}
// Verify the DN differences and only keep those.
......@@ -186,7 +192,7 @@ class tasks extends simplePlugin
"fdTasksGranularMailBCC" => $attrs['bcc']
];
break;
case 'fdTasksLifeCycle' :
case 'fdTasksGranularDN' :
$prepData['tasksGranular'] = [
"fdTasksGranularDN" => $dn,
"fdTasksGranularType" => 'Life Cycle',
......
......@@ -186,8 +186,9 @@ class tasksLifeCycle extends simplePlugin
*/
public function generateSlaveTasks ()
{
$listOfDN = $this->attributesAccess['fdTasksLifeCycleListOfDN']->getValue();
$attributeType = 'fdTasksLifeCycle';
$listOfDN = $this->attributesAccess['fdTasksLifeCycleListOfDN']->getValue();
// The attribute required to be search in createSlaveTasks
$attributeType = 'fdTasksGranularDN';
// Call the method from parent tasks object (first tab) to create sub-tasks.
$this->parent->getBaseObject()->createSlaveTasks($listOfDN, $attributeType);
......
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