diff --git a/htdocs/projet/ganttchart.inc.php b/htdocs/projet/ganttchart.inc.php
index 59cb59da5f6..93bf9205c70 100644
--- a/htdocs/projet/ganttchart.inc.php
+++ b/htdocs/projet/ganttchart.inc.php
@@ -40,6 +40,7 @@
';
?>
+
@@ -173,6 +174,7 @@ else
}
+
@@ -189,8 +191,11 @@ else
*/
function constructGanttLine($tarr, $task, $task_dependencies, $level = 0, $project_id = null)
{
- global $langs;
+ global $langs, $db;
global $dateformatinput2;
+ $projectstatic = new Project($db);
+ $taskstatic = new Task($db);
+
$start_date = $task["task_start_date"];
$end_date = $task["task_end_date"];
@@ -222,21 +227,29 @@ function constructGanttLine($tarr, $task, $task_dependencies, $level = 0, $proje
}
// Define percent
$percent = empty($task['task_percent_complete']) ? 0 : $task['task_percent_complete'];
- // Link (more information)
+
+ // Link and name (more information)
if ($task["task_id"] < 0) {
- //$link=DOL_URL_ROOT.'/projet/tasks.php?withproject=1&id='.abs($task["task_id"]);
- $link = '';
+ $link=DOL_URL_ROOT.'/projet/card.php?id='.abs($task["task_id"]);
+ $fetchresult = $projectstatic->fetch(abs($task["task_id"]));
+ if ($fetchresult > 0) {
+ $tmpname = $projectstatic->getNomUrl(0, 'withproject', 1);
+ $name = '