Browse Source

SONAR-13848 remove deprecated response field 'debtTotal' from api/issues/search

tags/8.8.0.42792
Michal Duda 3 years ago
parent
commit
8b2bba6fe6

+ 1
- 9
server/sonar-webserver-webapi/src/main/java/org/sonar/server/issue/ws/SearchResponseFormat.java View File

@@ -92,7 +92,7 @@ public class SearchResponseFormat {
SearchWsResponse.Builder response = SearchWsResponse.newBuilder();

formatPaging(paging, response);
formatEffortTotal(data, response);
ofNullable(data.getEffortTotal()).ifPresent(response::setEffortTotal);
response.addAllIssues(formatIssues(fields, data));
response.addAllComponents(formatComponents(data));
formatFacets(data, facets, response);
@@ -126,14 +126,6 @@ public class SearchResponseFormat {
return response.build();
}

private static void formatEffortTotal(SearchResponseData data, SearchWsResponse.Builder response) {
Long effort = data.getEffortTotal();
if (effort != null) {
response.setDebtTotal(effort);
response.setEffortTotal(effort);
}
}

private static void formatPaging(Paging paging, SearchWsResponse.Builder response) {
response.setP(paging.pageIndex());
response.setPs(paging.pageSize());

+ 0
- 1
server/sonar-webserver-webapi/src/test/resources/org/sonar/server/issue/ws/SearchActionTest/filter_by_leak_period.json View File

@@ -8,7 +8,6 @@
"total": 1
},
"effortTotal": 10,
"debtTotal": 10,
"issues": [
{
"key": "7b112bd4-b650-4037-80bc-82fd47d4eac2",

+ 0
- 1
server/sonar-webserver-webapi/src/test/resources/org/sonar/server/issue/ws/SearchActionTest/filter_by_leak_period_has_no_effect_on_prs.json View File

@@ -8,7 +8,6 @@
"total": 2
},
"effortTotal": 20,
"debtTotal": 20,
"issues": [
{
"key": "7b112bd4-b650-4037-80bc-82fd47d4eac2",

+ 0
- 1
server/sonar-webserver-webapi/src/test/resources/org/sonar/server/issue/ws/SearchActionTest/filter_by_main_scope.json View File

@@ -8,7 +8,6 @@
"total": 2
},
"effortTotal": 20,
"debtTotal": 20,
"issues": [
{
"key": "7b112bd4-b650-4037-80bc-82fd47d4eac2",

+ 0
- 1
server/sonar-webserver-webapi/src/test/resources/org/sonar/server/issue/ws/SearchActionTest/filter_by_main_scope_2.json View File

@@ -8,7 +8,6 @@
"total": 2
},
"effortTotal": 20,
"debtTotal": 20,
"issues": [
{
"key": "7b112bd4-b650-4037-80bc-82fd47d4eac2",

+ 0
- 1
server/sonar-webserver-webapi/src/test/resources/org/sonar/server/issue/ws/SearchActionTest/filter_by_test_scope.json View File

@@ -8,7 +8,6 @@
"total": 1
},
"effortTotal": 10,
"debtTotal": 10,
"issues": [
{
"key": "82fd47d4-4037-b650-80bc-7b112bd4eac2",

+ 1
- 2
sonar-ws/src/main/protobuf/ws-issues.proto View File

@@ -28,6 +28,7 @@ option optimize_for = SPEED;

// Response of GET api/issues/search
message SearchWsResponse {
reserved 5;
optional int64 total = 1;
optional int64 p = 2;
optional int32 ps = 3;
@@ -35,8 +36,6 @@ message SearchWsResponse {

// Total amount of effort, only when the facet "total" is enabled
optional int64 effortTotal = 13;
// Deprecated since 5.5, replaced by effortTotal
optional int64 debtTotal = 5;

repeated Issue issues = 6;
repeated Component components = 7;

Loading…
Cancel
Save