Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/1-report-bug.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "🐛 Bug report"
labels: ["bug"]
type: "Bug"
description: Create a bug report to help us improve

body:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/2-feature-request.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "🚀 Feature request"
labels: ["enhancement"]
type: "feature"
description: I have a suggestion

body:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
build
target
bin
work/
.work
.env*
.docker
*.code-workspace

Expand Down
8 changes: 7 additions & 1 deletion src/main/java/hudson/plugins/jira/JiraRestService.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,13 @@
import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.logging.Logger;
Expand Down Expand Up @@ -226,9 +229,12 @@ public List<String> getProjectsKeys() {

public List<Issue> getIssuesFromJqlSearch(String jqlSearch, Integer maxResults) throws TimeoutException {
try {
Set<String> neededFields =
new HashSet<>(Arrays.asList("summary", "issuetype", "created", "updated", "project", "status"));

final SearchResult searchResult = jiraRestClient
.getSearchClient()
.searchJql(jqlSearch, maxResults, 0, null)
.searchJql(jqlSearch, maxResults, 0, neededFields)
.get(timeout, TimeUnit.SECONDS);
return StreamSupport.stream(searchResult.getIssues().spliterator(), false)
.collect(Collectors.toList());
Expand Down
7 changes: 3 additions & 4 deletions src/main/java/hudson/plugins/jira/JiraSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public Issue getIssue(String id) {
* @return issues matching the JQL query
*/
public List<Issue> getIssuesFromJqlSearch(final String jqlSearch) throws TimeoutException {
return service.getIssuesFromJqlSearch(jqlSearch, Integer.MAX_VALUE);
return service.getIssuesFromJqlSearch(jqlSearch, 100);
}

/**
Expand Down Expand Up @@ -173,11 +173,10 @@ public List<Issue> getIssuesWithFixVersion(String projectKey, String version, St
LOGGER.fine("Fetching versions from project: " + projectKey + " with fixVersion:" + version);
if (isNotEmpty(filter)) {
return service.getIssuesFromJqlSearch(
String.format("project = \"%s\" and fixVersion = \"%s\" and " + filter, projectKey, version),
Integer.MAX_VALUE);
String.format("project = \"%s\" and fixVersion = \"%s\" and " + filter, projectKey, version), 100);
}
return service.getIssuesFromJqlSearch(
String.format("project = \"%s\" and fixVersion = \"%s\"", projectKey, version), Integer.MAX_VALUE);
String.format("project = \"%s\" and fixVersion = \"%s\"", projectKey, version), 100);
}

/**
Expand Down
Loading