dsbm49845 2015-09-02 22:53
浏览 10
已采纳

是什么触发了AtTask中添加的新任务以显示在用户MyWork中?

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

  • 写回答

1条回答 默认 最新

  • doujiao3074 2015-09-03 19:39
    关注

    You move this by using the following

    PUT attask/api/task/xxxxx?action=acceptWork
    

    so try adding the following to the code

    'action'=>"acceptWork" 
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 pyqt5tools安装失败
  • ¥15 mmdetection
  • ¥15 nginx代理报502的错误
  • ¥100 当AWR1843发送完设置的固定帧后,如何使其再发送第一次的帧
  • ¥15 图示五个参数的模型校正是用什么方法做出来的。如何建立其他模型
  • ¥100 描述一下元器件的基本功能,pcba板的基本原理
  • ¥15 STM32无法向设备写入固件
  • ¥15 使用ESP8266连接阿里云出现问题
  • ¥15 BP神经网络控制倒立摆
  • ¥20 要这个数学建模编程的代码 并且能完整允许出来结果 完整的过程和数据的结果