How to expose asana task creator?

2019-06-14 04:22发布

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!

标签: asana
1条回答
霸刀☆藐视天下
2楼-- · 2019-06-14 04:41

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.

查看更多
登录 后发表回答