Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to get all jira issues in .Net using Atlassian SDK 2.5

Doodle Kana March 23, 2015

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?

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Doodle Kana March 24, 2015

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.

Doodle Kana March 24, 2015

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]);

0 votes
Doodle Kana March 23, 2015

without startAt I cannot get all the issues. It is restricted to the max count

0 votes
Doodle Kana March 23, 2015

I tried some other fields like assignee and it works. "project=ABC AND assignee=\"Bob\""

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events