问题
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