revert(测试跟踪): 提交Jira缺陷时获取报告人不全

This commit is contained in:
shiziyuan9527 2022-03-22 18:14:58 +08:00 committed by shiziyuan9527
parent caa189ccd2
commit 5da2b480d0
1 changed files with 1 additions and 14 deletions

View File

@ -14,7 +14,6 @@ import org.springframework.util.MultiValueMap;
import org.springframework.web.client.HttpClientErrorException;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@ -88,19 +87,7 @@ public abstract class JiraAbstractClient extends BaseClient {
}
public List<JiraUser> getAssignableUser(String projectKey) {
List<JiraUser> list = new ArrayList<>();
int maxResults = 50, startAt = 0;
List<JiraUser> users;
do {
users = getAssignableUser(projectKey, startAt, maxResults);
list.addAll(users);
startAt += maxResults;
} while (users.size() >= maxResults);
return list;
}
private List<JiraUser> getAssignableUser(String projectKey, int startAt, int maxResults) {
String url = getBaseUrl() + "/user/assignable/search?project={1}&maxResults=" + maxResults + "&startAt=" + startAt;
String url = getBaseUrl() + "/user/assignable/search?project={1}";
ResponseEntity<String> response = null;
try {
response = restTemplate.exchange(url, HttpMethod.GET, getAuthHttpEntity(), String.class, projectKey);