From 963da34f9ce36ab5ff2d2b196bcc5bdffe2d5b34 Mon Sep 17 00:00:00 2001 From: Xavier CAILLAUD Date: Thu, 27 Jun 2024 15:45:16 +0200 Subject: [PATCH] Fix Default Tech With Task Template (#17360) * Fix Default Tech With Task Template * Fix action * Add check for groups_id_tech too --- ajax/task.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ajax/task.php b/ajax/task.php index 7855fa154a6..2868aaaad96 100644 --- a/ajax/task.php +++ b/ajax/task.php @@ -110,6 +110,13 @@ } } +if ($template->fields['groups_id_tech'] == 0) { + unset($template->fields['groups_id_tech']); +} + +if ($template->fields['users_id_tech'] == 0) { + unset($template->fields['users_id_tech']); +} // Return json response with the template fields echo json_encode($template->fields);