I can get number of issues using
var issues = client.GetIssuesFromJql("project=ABC",999)
But if i want more issues than that it will fail. That is fine, I could use startAt position right? Wrong. I cannot get that part of the query. "project=ABC and startAt=0" I get error back saying "Query validation failed: Field 'startAt' does not exist" I have used startAt before when using curl fine. Like this
{"jql":"project=ABC","startAt":0,"maxResults":-1}
So why in this nuget startAt not working or recognized?
Community moderators have prevented the ability to post new answers.
After some searching I found https://bitbucket.org/farmas/atlassian.net-sdk/wiki/JQL which lists all the supported jql in the framework. Looks like startAt is not listed here. Not all jql statements are supported in this framework. There does not seem to be anyway to get number of issues in a given project using this library. I am not sure how to get that number. I have a hack where I have to provide the last issue number and let us say start issue number is 50 and ending is 42000. In my code I increment it by 999 in each retrieval until hit that max 42000. The downside to that would be to provide that max number each time since it will be changing everytime new issues are created. Let me know if there easier ways.
Here is a hack code I came up with to get the latest issue number. string latestJql = "project=" + _project + " ORDER BY key DESC"; var latestIssue = _client.GetIssuesFromJql(latestJql, 1).SingleOrDefault().Key.ToString(); string[] temp = latestIssue.Split('-'); _maxIssueNumber = Convert.ToInt32(temp[1]);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
without startAt I cannot get all the issues. It is restricted to the max count
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried some other fields like assignee and it works. "project=ABC AND assignee=\"Bob\""
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.