Are Asana stories guaranteed to be returned in time order sequence? - asana

While trying the Asana API for task stories I noticed that the server sends back a list of all the stories in time-ordered sequence i.e sorted on the created_at field. The first element in the list is the first story of that task and the last item is the latest story. Is this ordering guaranteed by design? And can this be relied upon in the code? I want to get the latest activity by looking at the last element of the returned list. Documentation has no such information.

You're correct, we order stories by creation time in any situation where you get a set of stories. I'm adding that to the documentation now. Thanks for the catch!

Related

How to order tasks by importance in microsoft todo task graph API?

I'm trying to programmatically retrieve the same information which the Microsoft ToDo desktop and mobile app display.
While I'm able to load the tasks, I'm not able to retrieve them in the same order.
In the app you can sort by importance, which probably uses some internal priority, which is adapted if you move tasks around.
I can't find such a field in the API specs though:
https://learn.microsoft.com/en-us/graph/api/resources/todotask?view=graph-rest-1.0
Is there any way to retrieve this kind of sorting as well via the API?
E.g. I saw that for the planner and its tasks there's an orderHint, I guess I'm looking for something like this:
https://learn.microsoft.com/en-us/graph/api/resources/plannertask?view=graph-rest-beta
By the importance field, you could use OData params filter or orderBy by "importance" column, as per the example below:
Although, I strongly believe you don't want "importance" ordering, but the custom order as you've mentioned "if you move tasks around", for this, I have raised a detailed question here: How to get and set custom order on MS To-Do using GraphAPI mentioning how To-Do application works, with the "OrderDateTime" field.

Zapier: How to make sure that I return items only once for polling trigger

I am implementing a Zapier Integration's polling trigger. I have built a trigger and an API which serves the data correctly. However my concern is about: how to make sure that I provide the new data only, when zapier polls.
I know about the deduplication mechanism. I provide ids in all the items and Zapier makes sure that one item is used only once. However in my application the items can go into hundreds very quickly and in months they will be in thousands and beyond. I want an optimised solution where I serve only the items which will eventually be used by Zapier, thus reducing the memory usage in my application.
Some timestamp can be save for every call, which I can store inside my application but that will not be a foolproof solution. Same API can be used by user in multiple zaps, plus there are sample calls etc.
Great question! The simplest way to do this is to add a date parameter to your API that lets you filter for items created after that date.
Then, in your Zapier code, provide that param for all trigger calls. I'd set the time to 24 hours ago. So, when a trigger fires, it'll only get items created in the last 24 hours. That could be a big list, but items will cycle out after a day.

JQL get hours logged per person per day

Hi guys so I am trying to make my life a bit easier and figure out how to get the values logged against different tasks by the same person in 1 day so I can basically get the sum of their hours logged in total. Currently I can do this via the browser filter option using:
worklogAuthor = currentUser() AND worklogDate = "2019/01/30"
The problem is it returns entire tasks not just the hours so I need to click through each task and then get the number against the work log. Is there a way I could limit the fields being returned so I just see the work logged and maybe the task id? I see that there is some documentation out there to do that but I haven't been able to get it quite right yet.
Given that it has been 2+ years, I hope you have since found another approach. The issue you are bumping into is simply that the Advanced Search will only return a list of tasks, you can't modify that "select". What I would recommend is leveraging either the reporting or dashboarding functionality. The 2 widgets that I would recommend would be either Issue Statistics, or Workload Pie Chart. Worst case scenario, you can always dump the data out to a csv or retrieve from an API and aggregate your data that way as well.

Get User Stories with more than 5 Bugs in TFS

I want to select user stories with more than 5 bugs as children.
Using below query I can get user stories with at least one bug but filtering out the ones with less than 5 I'm lost.
How can I do this? Or is there any other way I can get this output? i.e: TFS extension
There is no build-in feature to count/filter linked work item's count of a specific work item type.
As a workaround, you could export tfs query results to Excel and manage the results in excel side. With the help of excel, you should be able to filter out those work items you needs.
Another way is using TFS API to get the work items and their linked work items with bug type, finally count the number of linked work items. About how to use API, please take a look at this related question: Retrieving work items and their linked work items in a single query using the TFS APIs
You can use in the query in "Related Link Count" field:

Asana API roadmap - getting completed tasks (including archived)

Do you plan to add possibility to retrieve (via API) all tasks from project including those which are archived?
(I work at Asana)
That would be a useful feature and we are already planning on adding it. However, I can't comment as to when it will be possible.
Until the API officially supports this, you can always query /tasks?completed_since=now to get only incomplete tasks, then query /tasks, and filter for tasks that only appear in the second list.
Archived tasks can be accessed by including the parameter ?include_archived=true in your request for querying tasks by project.
Task section in Asana documentation
I am trying to do this exact same thing as well. We are using a project to track line down events on our manufacturing floor. I found this post helpful and you can append “?include_archived=true” to your query but I found out that you can also do a reverse lookup on tasks by their tag. This will also show achieved tasks as well.

Resources