I created a very simple C# application to retrieve a single record from our JIRA server via REST. It wasn't working to I used the example provided by JIRA and it looks like this:
Jira jiraConn = Jira.CreateRestClient("<omitted>", "<omitted>", "<omitted>");
var issues = from i in jiraConn.Issues.Queryable
where i.Project == "<omitted>"
orderby i.Created
select i;
foreach (var issue in issues)
{
if (issue != null)
{
Debug.WriteLine(issue.Project);
Debug.WriteLine(issue.Key);
Debug.WriteLine(issue.JiraIdentifier);
Debug.WriteLine(issue.Assignee);
}
}
It only retrieves 15 records and then it throws an error in the "foreach" statement
Exception thrown: 'System.NullReferenceException' in Newtonsoft.Json.dll
Object reference not set to an instance of an object.
I have also tried just a single query and it works on some issues such as the ones which were successfully returned but not on others. We make extensive use of custom fields in our JIRA issues and I have version 12.1.1 of the Atlassian SDK and version 4.7.1 of System.Text.Json
Thanks
Jerry