Whenever I use getTasks() it returns Invalid Request
However when I use getTasksForProject it will return values.
getTasks()
$tasks = $asana_client->tasks->getTasks(["opt_fields" => "name,due_on"]);
foreach ($tasks as $task) {
var_dump($task);//will return error
}
getTasksForProject
$tasks = $asana_client->tasks->getTasksForProject($projects[12]->gid, ["opt_fields" => "name,due_on"]);
foreach ($tasks as $task) {
var_dump($task);
}
object(stdClass)#312 (3) { ["gid"]=> string(16) "**8**3*31**73173" ["due_on"]=> string(10) "2020-06-26" ["name"]=> string(15) "Navbar Settings" }
What causes this error, under the documentation it does not say that a parameter for projectid is needed?
i try your code for project and works but the task script has a problem, i solved it like this:
my tasks function by workspace and asiggnee user gid:
and i called like this:
Finally try the items retrieved like this:
return dd($tasks);PD: sorry by my bad endglish