I am facing issue related to Search JQL. I am using the query
(issuefunction in issuesInEpics('key = ABCD-24911') and issuetype=Feature)
In Jira it is returning some record but when I am using this query in JiraRestClient
it is not working, but instead returning zero records.
It is working fine for below query :
issuefunction in issuesInEpics("resolution is not empty") and issuetype = Feature
Code Snippet:
String query="issuefunction in issuesInEpics('key = ABCD-24911') and issuetype=Feature";
Integer resultsLength=50,startAt=0;
JiraRestClient.getSearchClient().searchJql(query,resultsLength,startAt,null);
My Maven Dependency:
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client-api</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client-core</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>com.atlassian.fugue</groupId>
<artifactId>fugue</artifactId>
<version>2.2.1</version>
</dependency>
<dependency>
<groupId>com.atlassian.httpclient</groupId>
<artifactId>atlassian-httpclient-spi</artifactId>
<version>0.17.0-m01</version>
</dependency>
Anyone please help me to find the solution.
String query = URLEncoder.encode("issuefunction in issuesInEpics('key = ABCD-24911') and issuetype=Feature", "UTF-8");
– Marbles<dependency> <groupId>com.atlassian.jira</groupId> <artifactId>jira-rest-java-client-core</artifactId> <version>4.0.0</version> </dependency> <dependency> <groupId>com.atlassian.fugue</groupId> <artifactId>fugue</artifactId> <version>2.6.1</version> </dependency>
. Not able to reproduce the issue in my test. Are you sure you have the right search criteria ? – Marblestry(JiraRestClient client = new AsynchronousJiraRestClientFactory().createWithBasicHttpAuthentication(uri, username, password) {String query="issuefunction in issuesInEpics('key = ABCD-24911') and issuetype=Feature"; Integer resultsLength=50,startAt=0; JiraRestClient.getSearchClient().searchJql(query,resultsLength,startAt,null).claim.getIssues().forEach(issue->System.out.println(issue.getKey()));}
Could you share the exact search criteria that you use instead of one in the post ? – MarblesissuesInEpics()
. It looks like there is problem with search criteria since you get zero results back. Are your sure the user id have proper access to the project you are querying ? have you tried to query the any other projects ? – Marbles