Skip to content

Commit

Permalink
Fix Default Tech With Task Template (#17360)
Browse files Browse the repository at this point in the history
* Fix Default Tech With Task Template

* Fix action

* Add check for groups_id_tech too
  • Loading branch information
tsmr authored Jun 27, 2024
1 parent 0a7f091 commit 963da34
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ajax/task.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

0 comments on commit 963da34

Please sign in to comment.