You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @jhnferraris, I did my own hack and wrote the following function in the src/Task.php... Not sure if its the absoulte best way to do it but it seems to work.
public function insertSubTask(array $data)
{
$parent_task_id = empty($data['parent_task_id']) ? 0 : (int) $data['parent_task_id'];
if ($parent_task_id <= 0) {
throw new Exception('Required field parent_task_id');
}
if (!empty($data['files'])) {
$file = \TeamWorkPm\Factory::build('file');
$data['pending_file_attachments'] = $file->upload($data['files']);
unset($data['files']);
}
return $this->rest->post("tasks/$parent_task_id", $data);
}
then it can be called by doing something like this
Does your API framework allow the ability to add a subtask to a task? can you give an example if so?
The text was updated successfully, but these errors were encountered: