From: Wouter Admiraal Date: Fri, 18 Sep 2020 14:18:09 +0000 (+0200) Subject: Deprecate gateId parameter for /api/qualitygates/search X-Git-Tag: 8.6.0.39681~188 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0b9adba4230ea40e1b8d523981990b909b63dd1a;p=sonarqube.git Deprecate gateId parameter for /api/qualitygates/search --- diff --git a/server/sonar-web/src/main/js/api/quality-gates.ts b/server/sonar-web/src/main/js/api/quality-gates.ts index c81bc29a120..4078b2664d7 100644 --- a/server/sonar-web/src/main/js/api/quality-gates.ts +++ b/server/sonar-web/src/main/js/api/quality-gates.ts @@ -109,7 +109,7 @@ export function getGateForProject(data: { } export function searchProjects(data: { - gateId: string; + gateName: string; organization?: string; page?: number; pageSize?: number; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/Projects.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/Projects.tsx index a7eadc3eaa4..170f62078e0 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/Projects.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/Projects.tsx @@ -67,7 +67,7 @@ export default class Projects extends React.PureComponent { fetchProjects = (searchParams: SelectListSearchParams) => searchProjects({ - gateId: this.props.qualityGate.id, + gateName: this.props.qualityGate.name, organization: this.props.organization, page: searchParams.page, pageSize: searchParams.pageSize, diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/Projects-test.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/Projects-test.tsx index 15e36a03b11..f7a76c49793 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/Projects-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/Projects-test.tsx @@ -69,7 +69,7 @@ it('should render correctly', async () => { expect(searchProjects).toHaveBeenCalledWith( expect.objectContaining({ - gateId: qualityGate.id, + gateName: qualityGate.name, organization, page: 1, pageSize: 100,