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