c# - How to query Jira Issues based on their custom field values? - Stack Overflow

I am working with Jira dotnet SDK. I have an issue type that contains a custom field which I need to qu

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?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745079752a4610051.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信