How to get task status duration?

I need a way to determine how long a task has spent in a specific status.
what is the best way to get this information from API?

Hi @ptah Welcome to the monday community!

Your best option here would be via the activity log.

You would need to do some manual processing of the information as it will return a list of events. You would need to search for the change of status events and then work out the time difference.

You can find the information on the query here → https://monday.com/developers/v2#queries-section-activity-logs

1 Like

Another option:

query{items(ids:1234567){column_values(ids:status){ value }}}

will return something like: …“value”: “{“index”:1,“post_id”:null,“changed_at”:“2020-07-09T13:20:20.400Z”}”…

1 Like

That looks good, however, how do I link them together in a graph like way to determine order of events

Hey @JCorrell and @mitchell.hudson - thanks for helping out here and providing some really amazing suggestions! I appreciate it.

@ptah I’m afraid this is not something you can manage in our API itself, and it would rather be up to you to configure the way your data is structured on your end after you grab the info you need. Does that make sense?

-Alex

Hello,

I’ve reached something similar with time tracking automations. I created a Time Tracking column for each of my status and then set 2 automations for them.
The automations are:

  • “When Status changes to Doing start DoingTimeTracking”
  • “When Status changes from Doing to anything stop DoingTimeTracking”

With this I can log how long each task has been kept in each status. I also wanted to see this in a timeline, but that can’t be done yet (sadly :/)

Hope this helps,

1 Like

Hey @viniciusoh

Thank you for sharing that solution! That’s quite an awesome workaround using the tools that the platform offers - nicely done :slight_smile:

I appreciate your effort in making a clear post that will help other users. :pray:

-Alex