justeat/ZendeskApiClient

sortOrder always Asc.

Closed this issue · 2 comments

Setting sortOrder as Descending via SortOrder.Desc has no effect.
Data returned is always Asc.

The reason for this bug is in the ZendeskQuery.cs file, line 117 (alpha-374):
if (_sortOrder == SortOrder.Asc) { sb.Append("&sort_order=asc"); }

Instead this should be:
if (_sortOrder == SortOrder.Desc) { sb.Append("&sort_order=desc"); }

NOTE: In the ZendeskApi the sort order is ascending by default so we need to be able to set it as descending in the code. The current implementation only allows you to set the Zendesk API query sort order parameter to Ascending.

I've merged #147 which fixes this issue. A new release should be available later today.