Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullReferenceException when calling Issue.GetCustomFieldValue(string) #17

Open
dslagman opened this issue Feb 22, 2016 · 1 comment
Open

Comments

@dslagman
Copy link

When using the Issue.GetCustomFieldValue(string) method I receive an NullReferenceException. I use it as following:

JiraClient client = new JiraClient("aUserName, "aPassword", "aUrl");
List<Issue> issues = client.SearchIssues("aFilter");

foreach(Issue iss in issues)
{
     string remotelink = iss.GetCustomFieldValue("remotelink");
}

I get some issue back, but when I call the GetCustomFieldValue on the remotelink field I get the exception. I would assume getting an argument exception if the field does not exist. Is there a way to get a result for remotelink at all?

@jonas0007
Copy link
Owner

Can you check the stacktrace to see the exact line on which the exception occurs?
Also, can you check if the field exists when you call the Rest API manually using the following url?:

http://"aUrl"/rest/api/2/search?jql=aFilter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants