0

I've gone around in circles on the web trying to find any relevant information, including the API Docs, for ordering results by ASC/DESC order...

/task/search?name=NAME HERE&percentComplete=0&fields=plannedCompletionDate,project:status,project:name,project:plannedCompletionDate

I want to be able to have my results ordered by plannedCompletionDate instead of having to do it in code.

Rob Graham
  • 73
  • 1
  • 7

2 Answers2

1

you can do this by adding plannedCompletionDate_Sort=asc so your call would be

/task/search?name=NAME HERE&percentComplete=0&fields=plannedCompletionDate,project:status,project:name,project:plannedCompletionDate&plannedCompletionDate_Sort=asc
michael johnson
  • 757
  • 1
  • 4
  • 10
  • 1
    It simply blows my mind with how detailed of an API AtTask has, they can't document something as simple, yet as powerful, as ordering.. – Rob Graham Feb 05 '15 at 03:41
0

If you need to sort by string (i.e. project name) you can also use name_Sort=ciasc to get case insensitive results:

/project/search&method=GET&status=CUR&name_Sort=ciasc&fields=name

Credits: Blue Agave and Hamlet Hakobyan

Community
  • 1
  • 1
Michał Maluga
  • 453
  • 3
  • 14