Accessing Task Status Change Info (Date of Change, Status)

Hi there, is there any way we can retrieve the data for when a Task's status is change, as well as the corresponding timestamp of that change? I'm referring to this:

 

I had thought this would be under Tasks/Comments, but when I retrieve the list of results, it shows all the comments but none of the status changes. It's also not available under Tasks. My code in Python is as follows:

import requests

# Search through a list of dictionaries
def list_dict_search(list_name, key_name, key_value):
return [element for element in list_name if key_value in element[key_name]]

def main():
headers = {
'authorization': "bearer <PERMANENT_ACCESS_TOKEN_HERE>",
}

tasks_url = "https://www.wrike.com/api/v4/tasks"
tasks_response = requests.get(tasks_url,
params={'fields': "['authorIds']"},
headers=headers).json()["data"]
tasks_response_filtered = list_dict_search(tasks_response, "title", "Targeting Owner")
#Add more filtering by date, task status, etc.
#authorIds, (task) id, createdDate, completedDate, parentIds (project/folder name)
tasks_ids = [d['id'] for d in tasks_response_filtered]
task_comment_url_results = []

for id in tasks_ids:
task_comment_url = "https://www.wrike.com/api/v4/tasks/"+id+"/comments"
task_comment_url_response = requests.get(task_comment_url,
params={'plainText': "true"},
headers=headers).json()["data"]
task_comment_url_results += task_comment_url_response

#Assigned task to
#Changed status to

print(task_comment_url_results)

if __name__ == '__main__':
main()

import requests

# Search through a list of dictionaries
def list_dict_search(list_name, key_name, key_value):
return [element for element in list_name if key_value in element[key_name]]

def main():
headers = {
'authorization': "bearer <PERMANENT_ACCESS_TOKEN_HERE>",
}

tasks_url = "https://www.wrike.com/api/v4/tasks"
tasks_response = requests.get(tasks_url,
params={'fields': "['authorIds']"},
headers=headers).json()["data"]
tasks_response_filtered = list_dict_search(tasks_response, "title", "Targeting Owner")
#Add more filtering by date, task status, etc.
#authorIds, (task) id, createdDate, completedDate, parentIds (project/folder name)
tasks_ids = [d['id'] for d in tasks_response_filtered]
task_comment_url_results = []

for id in tasks_ids:
task_comment_url = "https://www.wrike.com/api/v4/tasks/"+id+"/comments"
task_comment_url_response = requests.get(task_comment_url,
params={'plainText': "true"},
headers=headers).json()["data"]
task_comment_url_results += task_comment_url_response

#Assigned task to
#Changed status to

print(task_comment_url_results)

if __name__ == '__main__':
main()

Being able to have this data would be very useful as we can use it to measure our operational efficiency and the time it takes between task changes. Thank you.

1
5 comentários
Spot On Innovative Approach Stellar Advice
Avatar

Hi Yuan Chin Soh, welcome to the Community!

For this we'll need to ask our Advanced Support, so I'm creating a ticket for you now.

Please let me know if you have any other questions! 

Lisa Community Team at Wrike Wrike Product Manager Become a Wrike expert with Wrike Discover

Lisa Wrike Team member Become a Wrike expert with Wrike Discover

0
Ações de comentário Permalink
Spot On Innovative Approach Stellar Advice
Avatar

What is truly annoying about this community forum is that all these great questions that other Wrike users ask, the answers and/or resolutions are never posted. Why is this a community forum when its all handling internally to the ticket system?

Thanks

Jeremy

 

1
Ações de comentário Permalink
Spot On Innovative Approach Stellar Advice
Avatar

Hi Jeremy Miedreich, welcome to the Community!

Thanks a lot for your feedback! We are always looking for ways to help you get the best experience, so your feedback is extremely valuable. The purpose of this forum is that the Community members help each other with the API questions, but we also raise tickets when there are no other replies. Please feel free to ask your questions here too and help others when you can 🙂 And here's our Advanced Support's reply to Yuan's question:

It's not possible to query Stream records on a task via the API currently, but there's another approach, please see if it may work for your team.  You can use BI Export (https://help.wrike.com/hc/en-us/articles/360019094414-BI-Export) and check details about tasks in this file work_workflow_stage_history.

An alternative way to get new changes to tasks via the API is to set up webhooks for a project, this will be delivering to you new updates for tasks, including status change:  https://developers.wrike.com/webhooks/

I hope this helps! 

Lisa Community Team at Wrike Wrike Product Manager Become a Wrike expert with Wrike Discover

Lisa Wrike Team member Become a Wrike expert with Wrike Discover

0
Ações de comentário Permalink
Spot On Innovative Approach Stellar Advice
Avatar

Thank you - That is exactly what I would expect, that was very helpful.

0
Ações de comentário Permalink
Spot On Innovative Approach Stellar Advice
Avatar

Happy to hear it helped, Jeremy Miedreich🙂

Lisa Community Team at Wrike Wrike Product Manager Become a Wrike expert with Wrike Discover

Lisa Wrike Team member Become a Wrike expert with Wrike Discover

0
Ações de comentário Permalink

Folllowing List for Post: Accessing Task Status Change Info (Date of Change, Status)
[this list is visible for admins and agents only]

Alto
Didn’t find what you were looking for? Write new post