diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index cbee8d181ca..2261e06219b 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -599,13 +599,13 @@ class Project extends CommonObject $sql = "SELECT rowid FROM " . MAIN_DB_PREFIX . $tablename." WHERE ".$projectkey." IN (". $ids .") AND entity IN (".getEntity($type).")"; } - if ($dates > 0) + if ($dates > 0 && ($type != 'project_task')) // For table project_taks, we want the filter on date apply on project_time_spent table { if (empty($datefieldname) && ! empty($this->table_element_date)) $datefieldname=$this->table_element_date; if (empty($datefieldname)) return 'Error this object has no date field defined'; $sql.=" AND (".$datefieldname." >= '".$this->db->idate($dates)."' OR ".$datefieldname." IS NULL)"; } - if ($datee > 0) + if ($datee > 0 && ($type != 'project_task')) // For table project_taks, we want the filter on date apply on project_time_spent table { if (empty($datefieldname) && ! empty($this->table_element_date)) $datefieldname=$this->table_element_date; if (empty($datefieldname)) return 'Error this object has no date field defined'; diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index b4d2a8b290f..4f5af0ca94f 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -532,7 +532,8 @@ if (! $showdatefilter) { print '