So I have a little bit of a dilemma in trying to obtain the oldest task of a user. I’m able to get the oldest task of each user in my team's workspace, but takes 1 hour and 30 minutes to run.
Here's the current workflow that I have currently:
1) Get all users and store in a users var.
2) Iterate through all users.
3) For each user, grab all tasks and store in a tasks var.
4) Iterate through all tasks, compare task.modified_at attribute to oldest_task var, store in oldest_task if task.modified_at is older.
What's taking so long is the loading of and iterating through each user's tasks. Any ideas on how to make this process faster? Would there potentially be a way to query specifically for the oldest task of a user through the API?
I’m building a tool that will track the age of the oldest task for each user for tracking purposes. I would love to find out if there’s something that I’m missing.