diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php
index 7fddc12b7c9..3b5a0175d03 100644
--- a/htdocs/projet/card.php
+++ b/htdocs/projet/card.php
@@ -1153,11 +1153,14 @@ if ($action == 'create' && $user->rights->projet->creer) {
print $form->selectDate($object->date_start ? $object->date_start : -1, 'projectstart', 0, 0, 0, '', 1, 0);
print ' '.$langs->trans("to").' ';
print $form->selectDate($object->date_end ? $object->date_end : -1, 'projectend', 0, 0, 0, '', 1, 0);
- print ' getLinesArray(null, 0);
+ if (!empty($object->usage_task) && !empty($object->lines)) {
+ print ' ';
}
- print '/>';
print '';
if (isModEnabled('eventorganization')) {
@@ -1379,6 +1382,11 @@ if ($action == 'create' && $user->rights->projet->creer) {
jQuery("#usage_task").prop("checked", true);
}
});
+
+ jQuery("#projectstart").change(function() {
+ console.log("We modify the start date");
+ jQuery("#divreportdate").show();
+ });
});
';
diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php
index 582e062f68a..1e4c6862c58 100644
--- a/htdocs/projet/class/project.class.php
+++ b/htdocs/projet/class/project.class.php
@@ -2305,11 +2305,11 @@ class Project extends CommonObject
/**
- * Create an array of tasks of current project
+ * Create an array of tasks of current project
*
- * @param User $user Object user we want project allowed to
+ * @param User $user Object user we want project allowed to
* @param int $loadRoleMode 1= will test Roles on task; 0 used in delete project action
- * @return int >0 if OK, <0 if KO
+ * @return int >0 if OK, <0 if KO
*/
public function getLinesArray($user, $loadRoleMode = 1)
{