How to expose asana task creator?

血红的双手。 提交于 2019-12-23 05:16:21

问题


I need to be able to expose who created a task in asana via the API. Currently I am only getting back who created comments on the task, who is currently assigned to the task, and who is following the task. This leaves me guessing who actually created the task. Thanks!


回答1:


Asana support got back to me first by email so I will answer this for anyone else. Bit of a workaround.

Api calls to:
/tasks/{task-id}/stories
/projects/{project-id}/stories

These will give you the system messages generated when assigning a task and the comments on the task. If the task has been reassigned to someone you will have something like:

[{u'text': u'assigned to Bob', u'created_at': u'2013-03-18T23:24:21.159Z', u'type': u'system', u'id': 12345, u'created_by': {u'id': 54321, u'name': u'Nick'}}, {...},]

Using the fact that it is a type: system, not type: comment, and matching on the text field, you can find out the id of the creator.



来源:https://stackoverflow.com/questions/15504779/how-to-expose-asana-task-creator

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!