/** * Search for issues with the given query. * * @param jql JQL statement * * @return a search result structure with results (issues include all * navigable fields) * * @throws JiraException when the search fails */ public Issue.SearchResult searchIssues(String jql) throws JiraException { return searchIssues(jql, null, null, null, null); }
/** * Search for issues with the given query and max results. * * @param jql JQL statement * @param maxResults limit the number of results * * @return a search result structure with results (issues include all * navigable fields) * * @throws JiraException when the search fails */ public Issue.SearchResult searchIssues(String jql, Integer maxResults) throws JiraException { return searchIssues(jql, null, null, maxResults, null); }
/** * Search for issues with the given query and specify which fields to * retrieve and expand. * * @param jql JQL statement * * @param includedFields Specifies which issue fields will be included in * the result. * <br>Some examples how this parameter works: * <ul> * <li>*all - include all fields</li> * <li>*navigable - include just navigable fields</li> * <li>summary,comment - include just the summary and comments</li> * <li>*all,-comment - include all fields</li> * </ul> * * @param expandFields Specifies with issue fields should be expanded * * @return a search result structure with results * * @throws JiraException when the search fails */ public Issue.SearchResult searchIssues(String jql, String includedFields, String expandFields) throws JiraException { return searchIssues(jql, includedFields, expandFields, null, null); }
/** * Search for issues with the given query and specify which fields to * retrieve. * * @param jql JQL statement * * @param includedFields Specifies which issue fields will be included in * the result. * <br>Some examples how this parameter works: * <ul> * <li>*all - include all fields</li> * <li>*navigable - include just navigable fields</li> * <li>summary,comment - include just the summary and comments</li> * <li>*all,-comment - include all fields</li> * </ul> * * * @return a search result structure with results * * @throws JiraException when the search fails */ public Issue.SearchResult searchIssues(String jql, String includedFields) throws JiraException { return searchIssues(jql, includedFields, null, null, null); }
/** * Search for issues with the given query and specify which fields to * retrieve. * * @param jql JQL statement * @param maxResults limit the number of results * * @param includedFields Specifies which issue fields will be included in * the result. * <br>Some examples how this parameter works: * <ul> * <li>*all - include all fields</li> * <li>*navigable - include just navigable fields</li> * <li>summary,comment - include just the summary and comments</li> * <li>*all,-comment - include all fields</li> * </ul> * * * @return a search result structure with results * * @throws JiraException when the search fails */ public Issue.SearchResult searchIssues(String jql, String includedFields, Integer maxResults) throws JiraException { return searchIssues(jql, includedFields, null, maxResults, null); }
Integer maxResults, Integer startAt) throws JiraException { return searchIssues(jql, includedFields, null, maxResults, startAt);
BasicCredentials credentials=new BasicCredentials(userName,passWord); JiraClient jira=new JiraClient("https://myproject.info",credentials); Issue.SearchResult sr = jira.searchIssues("Your project Name(in my case TC)", 100); for (Issue i : sr.issues) { System.out.println(i.getSummary()); System.out.println(i.getKey()); etc ... }