feat: Update task query in get_tasks_gantt to exclude additional statuses

This commit is contained in:
2025-04-13 21:08:46 +02:00
parent 6b40888d06
commit 54e28a6762
2 changed files with 13 additions and 13 deletions

View File

@@ -28,8 +28,8 @@
},
"class.Cron.php": {
"type": "-",
"size": 8979,
"lmtime": 1744321951326,
"size": 9064,
"lmtime": 1744491806222,
"modified": false
},
"class.DbModel.php": {
@@ -95,8 +95,8 @@
},
"class.Tasks.php": {
"type": "-",
"size": 16669,
"lmtime": 1744323786682,
"size": 16189,
"lmtime": 1744485846921,
"modified": false
},
"class.Users.php": {
@@ -139,8 +139,8 @@
},
"class.Tasks.php": {
"type": "-",
"size": 18381,
"lmtime": 1744445308848,
"size": 18435,
"lmtime": 1744498887425,
"modified": false
},
"class.Users.php": {
@@ -297,14 +297,14 @@
"Simple-Gant-master": {
"frappe-gantt.css": {
"type": "-",
"size": 4756,
"lmtime": 1744445361651,
"size": 6233,
"lmtime": 1744498267948,
"modified": false
},
"frappe-gantt.js": {
"type": "-",
"size": 78713,
"lmtime": 1744445195672,
"size": 79101,
"lmtime": 1744498213646,
"modified": false
},
"frappe-gantt.js.map": {
@@ -374,8 +374,8 @@
},
"main_view.php": {
"type": "-",
"size": 31686,
"lmtime": 1744443300056,
"size": 31736,
"lmtime": 1744485597660,
"modified": false
},
"task_edit.php": {

View File

@@ -23,7 +23,7 @@ class Tasks
static public function get_tasks_gantt() {
global $mdb;
$tasks = $mdb -> query( 'SELECT t.id, t.name, t.date_start, t.date_end, t.status, t.client_id FROM tasks AS t WHERE show_in_calendar = 1 AND status != 2 AND t.date_start <= DATE_ADD(NOW(), INTERVAL 1 MONTH) ORDER BY date_start ASC' ) -> fetchAll( \PDO::FETCH_ASSOC );
$tasks = $mdb -> query( 'SELECT t.id, t.name, t.date_start, t.date_end, t.status, t.client_id FROM tasks AS t WHERE show_in_calendar = 1 AND status != 2 AND status != 3 AND status != 1 AND t.date_start <= DATE_ADD(NOW(), INTERVAL 1 MONTH) ORDER BY date_start ASC' ) -> fetchAll( \PDO::FETCH_ASSOC );
foreach ( $tasks as $task ) {
$task_json = [];
$task_json['name'] = $task['client_id'] ? \factory\Crm::get_client_name( (int)$task['client_id'] ) : $task['name'];