I am trying to find out what triggers new tasks added in AtTask to show up in a users MyWork queue. Here is the code I am using to post a new task to a project, but I still have to access the task on my browser to move it to my active work queue. I have tried to manually run a diff of the task fields for both the pre and post selection. Here is the code I am using to generate the new task:
$taskName = "Test..1";
$attask_newtask_url = 'https://foo.attask-ondemand.com/attask/api/v4.0/task';
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, $attask_newtask_url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array(
'name'=>$taskName,
'projectID'=>$projID,
'sessionID'=>$sessionID,
'assignedToID'=>$userID,
'plannedStartDate'=>"02/10/2015 10:00",
'plannedCompletionDate'=>"2/15/2015 14:00" ,
'taskConstraint'=>"FIXT",
'commitDate'=>"2/15/2015 14:00",
'condition'=>"0"
)));
$attask_newtask_json = curl_exec($ch);
curl_close($ch);
This code will create a new task in the indicated project, but the MyWork does not show the tasks.
Any suggestions? Thanks
You move this by using the following
PUT attask/api/task/xxxxx?action=acceptWork
so try adding the following to the code
'action'=>"acceptWork"