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

View File

@@ -23,7 +23,7 @@ class Tasks
static public function get_tasks_gantt() { static public function get_tasks_gantt() {
global $mdb; 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 ) { foreach ( $tasks as $task ) {
$task_json = []; $task_json = [];
$task_json['name'] = $task['client_id'] ? \factory\Crm::get_client_name( (int)$task['client_id'] ) : $task['name']; $task_json['name'] = $task['client_id'] ? \factory\Crm::get_client_name( (int)$task['client_id'] ) : $task['name'];