0

I am working with Jira dotnet SDK. I have an issue type that contains a custom field which I need to query my issues based on the value of this custom field. for example all of my issues have 'RequesterId' and now I want to retrieve all of the issues those are requested by Id '123'.

I tried this code:

var issueQuery = from issue in _jiraClient.Issues.Queryable
            where issue.CustomFields.Any( x=>x.Name == "RequesterId" && x.Values.Contains(userId)) && issue.Project == _settings.ProjectKey
            select issue;

but this code throw this exception:

System.InvalidOperationException: Response Status Code: 400. Response Content: {"errorMessages":["Error in the JQL Query: Expecting a field name but got ')'. You must surround ')' in quotation marks to use it as a field name. (line 1, character 23)"],"errors":{}} at Atlassian.Jira.Remote.JiraRestClient.GetValidJsonFromResponse(IRestRequest request, IRestResponse response) at Atlassian.Jira.Remote.JiraRestClient.ExecuteRequestAsync(Method method, String resource, Object requestBody, CancellationToken token) at Atlassian.Jira.Remote.IssueService.GetIssuesFromJqlAsync(IssueSearchOptions options, CancellationToken token)

is there any standard to search in issues base on their custom field value?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.