diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 414d344f4a8..8be79ee39e1 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -1757,9 +1757,22 @@ function searchTaskInChild(&$inc, $parent, &$lines, &$taskrole) function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks = 0, $status = -1, $listofoppstatus = array(), $hiddenfields = array()) { global $langs, $conf, $user, $bc; + global $theme_datacolor; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; + $listofstatus = array_keys($listofoppstatus); + $statusOppList = array(); + $themeColorId = 0; + foreach ($listofstatus as $oppStatus) { + $oppStatusCode = dol_getIdFromCode($db, $oppStatus, 'c_lead_status', 'rowid', 'code'); + if ($oppStatusCode) { + $statusOppList[$oppStatus]['code'] = $oppStatusCode; + $statusOppList[$oppStatus]['color'] = isset($theme_datacolor[$themeColorId]) ? implode(', ', $theme_datacolor[$themeColorId]) : ''; + } + $themeColorId++; + } + $projectstatic = new Project($db); $thirdpartystatic = new Societe($db); @@ -1942,7 +1955,23 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks } } - print '