diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index f3921b19502..89a70dc2329 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -701,6 +701,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t $taskstatic->duration_effective = $lines[$i]->duration_effective; $taskstatic->budget_amount = $lines[$i]->budget_amount; $taskstatic->billable = $lines[$i]->billable; + $taskstatic->status = $lines[$i]->status; $taskstatic->fk_statut = $lines[$i]->fk_statut; // Action column @@ -957,7 +958,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t // Status if (count($arrayfields) > 0 && !empty($arrayfields['t.fk_statut']['checked'])) { print ''; - print $taskstatic->getLibStatut(5); + print $taskstatic->getLibStatut(4); print ''; } diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index 1f18dae8220..77203f5cfbc 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -2498,12 +2498,12 @@ class Task extends CommonObjectLine $this->labelStatus[0] = 'Draft'; $this->labelStatus[1] = 'ToDo'; $this->labelStatus[2] = 'Running'; - $this->labelStatus[3] = 'Finish'; + $this->labelStatus[3] = 'Closed'; $this->labelStatus[4] = 'Transfered'; $this->labelStatusShort[0] = 'Draft'; $this->labelStatusShort[1] = 'ToDo'; $this->labelStatusShort[2] = 'Running'; - $this->labelStatusShort[3] = 'Completed'; + $this->labelStatusShort[3] = 'Closed'; $this->labelStatusShort[4] = 'Transfered'; if ($mode == 0) { @@ -2540,17 +2540,17 @@ class Task extends CommonObjectLine } } elseif ($mode == 4) { if ($status == 0) { - return img_picto($langs->trans($this->labelStatusShort[$status]), 'statut0').' '.$langs->trans($this->labelStatus[$status]); + return dolGetStatus($langs->trans($this->labelStatus[$status]), $langs->trans($this->labelStatusShort[$status]), '', 'status0', $mode); } elseif ($status == 1) { - return img_picto($langs->trans($this->labelStatusShort[$status]), 'statut1').' '.$langs->trans($this->labelStatus[$status]); + return dolGetStatus($langs->trans($this->labelStatus[$status]), $langs->trans($this->labelStatusShort[$status]), '', 'status1', $mode); } elseif ($status == 2) { - return img_picto($langs->trans($this->labelStatusShort[$status]), 'statut3').' '.$langs->trans($this->labelStatus[$status]); + return dolGetStatus($langs->trans($this->labelStatus[$status]), $langs->trans($this->labelStatusShort[$status]), '', 'status2', $mode); } elseif ($status == 3) { - return img_picto($langs->trans($this->labelStatusShort[$status]), 'statut6').' '.$langs->trans($this->labelStatus[$status]); + return dolGetStatus($langs->trans($this->labelStatus[$status]), $langs->trans($this->labelStatusShort[$status]), '', 'status3', $mode); } elseif ($status == 4) { - return img_picto($langs->trans($this->labelStatusShort[$status]), 'statut6').' '.$langs->trans($this->labelStatus[$status]); + return dolGetStatus($langs->trans($this->labelStatus[$status]), $langs->trans($this->labelStatusShort[$status]), '', 'status4', $mode); } elseif ($status == 5) { - return img_picto($langs->trans($this->labelStatusShort[$status]), 'statut5').' '.$langs->trans($this->labelStatus[$status]); + return dolGetStatus($langs->trans($this->labelStatus[$status]), $langs->trans($this->labelStatusShort[$status]), '', 'status5', $mode); } } elseif ($mode == 5) { /*if ($status==0) return $langs->trans($this->labelStatusShort[$status]).' '.img_picto($langs->trans($this->labelStatusShort[$status]),'statut0'); diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index 760cebdf120..e28d70853ad 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -1091,6 +1091,7 @@ if ($action == 'create' && $user->hasRight('projet', 'creer') && (empty($object- } if (!empty($arrayfields['t.fk_statut']['checked'])) { print ''; + //TODO: add status filter print ''; }