Conor Bowes Posted September 19, 2017 Report Share Posted September 19, 2017 Hey, I am having some trouble accessing activities for a given object. I am hoping to retrieve the time an object changed status, and can successfully retrieve the task that I wish to check, but cannot find how to get the activity log for this object. Is there something obvious I am missing? Link to comment Share on other sites More sharing options...
Mattias Lagergren Posted September 20, 2017 Report Share Posted September 20, 2017 This should help you get all events from e.g. a task: session.query('Event where parent_id is "{0}"'.format(task['id'])).all() Link to comment Share on other sites More sharing options...
Conor Bowes Posted September 21, 2017 Author Report Share Posted September 21, 2017 Had already found this, but cannot see where in this structure the activities are held - any chance you could point me in the right direction? Link to comment Share on other sites More sharing options...
Mattias Lagergren Posted September 22, 2017 Report Share Posted September 22, 2017 I'm afraid I do not fully understand: "cannot see where in this structure the activities are held". On the Event you have "data" where the details of the change is kept: event['data'] Link to comment Share on other sites More sharing options...
Conor Bowes Posted September 24, 2017 Author Report Share Posted September 24, 2017 Hi Mattias, The information I am trying to retrieve is found in the Activities Panel of the task - specifically the date and time it was set. When I run the command you suggest - I receive the return value (below) and cannot find the information I am after in this structure. Quote "{"typeid": {"new": "2c34eb84-4e57-11e7-ba85-0a580a5c09a0", "old": null}, "showid": {"new": "ba612dc0-4e55-11e7-916e-0a580a5c09a0", "old": null}, "name": {"new": "Processing", "old": null}, "isopen": {"new": false, "old": null}, "context_type": {"new": "task", "old": null}, "bid": {"new": 0.0, "old": null}, "taskid": {"new": "5dd6b553-a0b2-47bc-a2f1-310214808b5a", "old": null}, "priorityid": {"new": "9661b320-3a0c-11e2-81c1-0800200c9a66", "old": null}, "id": {"new": "5dd6b553-a0b2-47bc-a2f1-310214808b5a", "old": null}, "parent_id": {"new": "83417c1b-9536-4122-baf2-2b12addcf2ab", "old": null}, "object_typeid": {"new": "11c137c0-ee7e-4f9c-91c5-8c77cec22b2c", "old": null}, "isrequirecomment": {"new": false, "old": null}, "statusid": {"new": "8efe9a1e-508a-11e7-ba85-0a580a5c09a0", "old": null}, "description": {"new": "", "old": null}}" Link to comment Share on other sites More sharing options...
Mattias Lagergren Posted September 25, 2017 Report Share Posted September 25, 2017 You can get the time from the event via the created_at attribute: print event['created_at'] As for the status you will be looking for changes on the `statusid` (unfortunately it uses legacy names for the attributes). Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.