Merge pull request #16328 from ATM-Consulting/new/14.0_auto_close_project_when_all_tasks_done

FIX - possible warning in recently added feature (autoclose project when tasks done)
This commit is contained in:
Laurent Destailleur 2021-02-19 13:52:06 +01:00 committed by GitHub
commit f814c70a63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -390,7 +390,7 @@ class Task extends CommonObject
}
}
if (!$error && $conf->global->PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE) {
if (!$error && !empty($conf->global->PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE)) {
// Close the parent project if it is open (validated) and its tasks are 100% completed
$project = new Project($this->db);
if ($project->fetch($this->fk_project) > 0 && $project->statut == Project::STATUS_VALIDATED) {