Exception Thrown in Youtacksharp when Querying Issue Count via REST API


I have run into an issue that hopefully you have a solution for. I am using the .Net based YoutrackSharp to interact with the REST API and noticed that when querying issues by query-  (using either the /rest/project/issues or the /rest/issue endpoint) there appears to be a hard coded max issues returned of 500 (setting the max parameter higher via the query parameters seems to have no effect on this). 

As such, I am now trying to grab all issues in 500 issue batches but seem to be having issues grabbing the issue count via the built in IssueManagement::GetIssueCount(string searchString) method but get a NullReferenceException exception thrown when I do. It appears that the code is expecting the value in the response to be mapped to the Entity.Value field in the Count object but this is not happening. If I hit the endpoint manually the the browser or  a rest client, I do get a response:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><int>17986</int>

How can I work around this? 

1 comment
Official comment

Hello Ryan,

I assume this may be affected by the value set in "Max Issues to Export" field on Administration -> Global settings page.


Please sign in to leave a comment.