Merge pull request #12486 from TobiasSekan/FixBoardTaskNumberAlwaysZero

Fix open tasks number on dashboard was always zero
This commit is contained in:
Laurent Destailleur 2019-11-22 14:37:48 +01:00 committed by GitHub
commit 796c13403d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1985,7 +1985,7 @@ class Task extends CommonObject
$sql .= " WHERE p.entity IN (".getEntity('project', 0).')';
$sql .= " AND p.fk_statut = 1";
$sql .= " AND t.fk_projet = p.rowid";
$sql .= " AND t.progress < 100"; // tasks to do
$sql .= " AND (t.progress IS NULL OR t.progress < 100)"; // tasks to do
if (!$user->rights->projet->all->lire) $sql .= " AND p.rowid IN (".$projectsListId.")";
// No need to check company, as filtering of projects must be done by getProjectsAuthorizedForUser
//if ($socid || ! $user->rights->societe->client->voir) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")";