aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/sonar-web/src/main/js/apps/issues/components/IssueHeader.tsx8
-rw-r--r--server/sonar-web/src/main/js/apps/issues/components/__tests__/__snapshots__/IssuesList-test.tsx.snap3
-rw-r--r--server/sonar-web/src/main/js/apps/issues/components/__tests__/__snapshots__/IssuesSourceViewer-test.tsx.snap8
-rw-r--r--server/sonar-web/src/main/js/apps/issues/components/__tests__/__snapshots__/ListItem-test.tsx.snap2
-rw-r--r--server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssue-test.tsx1
-rw-r--r--server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/__snapshots__/ConciseIssue-test.tsx.snap1
-rw-r--r--server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/__snapshots__/ConciseIssueBox-test.tsx.snap2
-rw-r--r--server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/__snapshots__/CrossComponentSourceViewer-test.tsx.snap3
-rw-r--r--server/sonar-web/src/main/js/components/SourceViewer/__tests__/__snapshots__/SourceViewer-test.tsx.snap2
-rw-r--r--server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/__snapshots__/LineIssueList-test.tsx.snap1
-rw-r--r--server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/__snapshots__/loadIssues-test.ts.snap1
-rw-r--r--server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/loadIssues-test.ts3
-rw-r--r--server/sonar-web/src/main/js/components/issue/__tests__/__snapshots__/IssueView-test.tsx.snap4
-rw-r--r--server/sonar-web/src/main/js/components/issue/__tests__/__snapshots__/issue-test.tsx.snap1
-rw-r--r--server/sonar-web/src/main/js/components/issue/components/IssueMessage.tsx9
-rw-r--r--server/sonar-web/src/main/js/components/issue/components/IssueTitleBar.tsx1
-rw-r--r--server/sonar-web/src/main/js/components/issue/components/IssueTransition.tsx9
-rw-r--r--server/sonar-web/src/main/js/components/issue/components/__tests__/IssueMessage-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/components/issue/components/__tests__/IssueTransition-test.tsx3
-rw-r--r--server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueActionsBar-test.tsx.snap19
-rw-r--r--server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueMessage-test.tsx.snap30
-rw-r--r--server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueTitleBar-test.tsx.snap9
-rw-r--r--server/sonar-web/src/main/js/components/issue/popups/SetTransitionPopup.tsx50
-rw-r--r--server/sonar-web/src/main/js/helpers/testMocks.ts1
-rw-r--r--server/sonar-web/src/main/js/types/types.ts1
-rw-r--r--sonar-core/src/main/resources/org/sonar/l10n/core.properties7
26 files changed, 23 insertions, 158 deletions
diff --git a/server/sonar-web/src/main/js/apps/issues/components/IssueHeader.tsx b/server/sonar-web/src/main/js/apps/issues/components/IssueHeader.tsx
index 0dc77673ba1..e9e9af6eb84 100644
--- a/server/sonar-web/src/main/js/apps/issues/components/IssueHeader.tsx
+++ b/server/sonar-web/src/main/js/apps/issues/components/IssueHeader.tsx
@@ -133,7 +133,6 @@ export default class IssueHeader extends React.PureComponent<Props, State> {
});
const ruleStatus = issue.ruleStatus as RuleStatus | undefined;
const ruleEngine = issue.externalRuleEngine;
- const manualVulnerability = issue.fromHotspot && issue.type === 'VULNERABILITY';
const { quickFixAvailable } = issue;
return (
@@ -184,13 +183,6 @@ export default class IssueHeader extends React.PureComponent<Props, State> {
<div className="badge spacer-right text-baseline">{ruleEngine}</div>
</Tooltip>
)}
- {manualVulnerability && (
- <Tooltip overlay={translate('issue.manual_vulnerability.description')}>
- <div className="badge spacer-right text-baseline">
- {translate('issue.manual_vulnerability')}
- </div>
- </Tooltip>
- )}
<div className="issue-meta issue-get-perma-link">
<Link
className="js-issue-permalink link-no-underline"
diff --git a/server/sonar-web/src/main/js/apps/issues/components/__tests__/__snapshots__/IssuesList-test.tsx.snap b/server/sonar-web/src/main/js/apps/issues/components/__tests__/__snapshots__/IssuesList-test.tsx.snap
index 7fed2c7faa0..7f9e4bae817 100644
--- a/server/sonar-web/src/main/js/apps/issues/components/__tests__/__snapshots__/IssuesList-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/issues/components/__tests__/__snapshots__/IssuesList-test.tsx.snap
@@ -21,7 +21,6 @@ exports[`should render correctly 2`] = `
"componentUuid": "foo1234",
"creationDate": "2017-03-01T09:36:01+0100",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -62,7 +61,6 @@ exports[`should render correctly 2`] = `
"componentUuid": "foo1234",
"creationDate": "2017-03-01T09:36:01+0100",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN3",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -99,7 +97,6 @@ exports[`should render correctly 2`] = `
"componentUuid": "foo1234",
"creationDate": "2017-03-01T09:36:01+0100",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
diff --git a/server/sonar-web/src/main/js/apps/issues/components/__tests__/__snapshots__/IssuesSourceViewer-test.tsx.snap b/server/sonar-web/src/main/js/apps/issues/components/__tests__/__snapshots__/IssuesSourceViewer-test.tsx.snap
index b1b99daff70..44f2305d623 100644
--- a/server/sonar-web/src/main/js/apps/issues/components/__tests__/__snapshots__/IssuesSourceViewer-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/issues/components/__tests__/__snapshots__/IssuesSourceViewer-test.tsx.snap
@@ -43,7 +43,6 @@ exports[`should render CrossComponentSourceViewer correctly 1`] = `
},
],
],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -144,7 +143,6 @@ exports[`should render CrossComponentSourceViewer correctly 1`] = `
},
],
],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -270,7 +268,6 @@ exports[`should render SourceViewer correctly: all secondary locations on same l
},
],
],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -371,7 +368,6 @@ exports[`should render SourceViewer correctly: all secondary locations on same l
},
],
],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -474,7 +470,6 @@ exports[`should render SourceViewer correctly: default 1`] = `
"componentUuid": "foo1234",
"creationDate": "2017-03-01T09:36:01+0100",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -506,7 +501,6 @@ exports[`should render SourceViewer correctly: default 1`] = `
"componentUuid": "foo1234",
"creationDate": "2017-03-01T09:36:01+0100",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -570,7 +564,6 @@ exports[`should render SourceViewer correctly: single secondary location 1`] = `
},
],
],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -671,7 +664,6 @@ exports[`should render SourceViewer correctly: single secondary location 1`] = `
},
],
],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
diff --git a/server/sonar-web/src/main/js/apps/issues/components/__tests__/__snapshots__/ListItem-test.tsx.snap b/server/sonar-web/src/main/js/apps/issues/components/__tests__/__snapshots__/ListItem-test.tsx.snap
index 241cbbbf251..08db4edb2b8 100644
--- a/server/sonar-web/src/main/js/apps/issues/components/__tests__/__snapshots__/ListItem-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/issues/components/__tests__/__snapshots__/ListItem-test.tsx.snap
@@ -39,7 +39,6 @@ exports[`should render correctly 1`] = `
"componentUuid": "foo1234",
"creationDate": "2017-03-01T09:36:01+0100",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -82,7 +81,6 @@ exports[`should render correctly 1`] = `
"componentUuid": "foo1234",
"creationDate": "2017-03-01T09:36:01+0100",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
diff --git a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssue-test.tsx b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssue-test.tsx
index 2987985ca51..a46e6ecb53f 100644
--- a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssue-test.tsx
+++ b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssue-test.tsx
@@ -30,7 +30,6 @@ const issue: Issue = {
componentUuid: '',
creationDate: '',
flows: [],
- fromHotspot: false,
key: '',
message: '',
project: '',
diff --git a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/__snapshots__/ConciseIssue-test.tsx.snap b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/__snapshots__/ConciseIssue-test.tsx.snap
index 67deeb639ef..90f4ac4c8fa 100644
--- a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/__snapshots__/ConciseIssue-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/__snapshots__/ConciseIssue-test.tsx.snap
@@ -15,7 +15,6 @@ exports[`should render 1`] = `
"componentUuid": "",
"creationDate": "",
"flows": Array [],
- "fromHotspot": false,
"key": "",
"message": "",
"project": "",
diff --git a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/__snapshots__/ConciseIssueBox-test.tsx.snap b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/__snapshots__/ConciseIssueBox-test.tsx.snap
index 074a4498639..0da568b1c6d 100644
--- a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/__snapshots__/ConciseIssueBox-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/__snapshots__/ConciseIssueBox-test.tsx.snap
@@ -29,7 +29,6 @@ exports[`should render correctly 1`] = `
"componentUuid": "foo1234",
"creationDate": "2017-03-01T09:36:01+0100",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -144,7 +143,6 @@ exports[`should render correctly 2`] = `
},
],
],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
diff --git a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/__snapshots__/CrossComponentSourceViewer-test.tsx.snap b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/__snapshots__/CrossComponentSourceViewer-test.tsx.snap
index a8911290159..bb4d3618332 100644
--- a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/__snapshots__/CrossComponentSourceViewer-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/__snapshots__/CrossComponentSourceViewer-test.tsx.snap
@@ -94,7 +94,6 @@ exports[`should render correctly 2`] = `
},
],
],
- "fromHotspot": false,
"key": "1",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -251,7 +250,6 @@ exports[`should render correctly: no component found 1`] = `
},
],
],
- "fromHotspot": false,
"key": "unknown",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -379,7 +377,6 @@ exports[`should render correctly: no component found 1`] = `
},
],
],
- "fromHotspot": false,
"key": "unknown",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
diff --git a/server/sonar-web/src/main/js/components/SourceViewer/__tests__/__snapshots__/SourceViewer-test.tsx.snap b/server/sonar-web/src/main/js/components/SourceViewer/__tests__/__snapshots__/SourceViewer-test.tsx.snap
index ef8cdb4d1ba..64cd5ee5bbe 100644
--- a/server/sonar-web/src/main/js/components/SourceViewer/__tests__/__snapshots__/SourceViewer-test.tsx.snap
+++ b/server/sonar-web/src/main/js/components/SourceViewer/__tests__/__snapshots__/SourceViewer-test.tsx.snap
@@ -83,7 +83,6 @@ exports[`should render correctly 1`] = `
"componentUuid": "foo1234",
"creationDate": "2017-03-01T09:36:01+0100",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -117,7 +116,6 @@ exports[`should render correctly 1`] = `
"componentUuid": "foo1234",
"creationDate": "2017-03-01T09:36:01+0100",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/__snapshots__/LineIssueList-test.tsx.snap b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/__snapshots__/LineIssueList-test.tsx.snap
index 4a7b0a9eff5..358eecbf76e 100644
--- a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/__snapshots__/LineIssueList-test.tsx.snap
+++ b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/__snapshots__/LineIssueList-test.tsx.snap
@@ -23,7 +23,6 @@ exports[`should render issues 1`] = `
"componentUuid": "foo1234",
"creationDate": "2017-03-01T09:36:01+0100",
"flows": Array [],
- "fromHotspot": false,
"key": "issue",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
diff --git a/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/__snapshots__/loadIssues-test.ts.snap b/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/__snapshots__/loadIssues-test.ts.snap
index 4723e8ebc88..24e1b6a9eb1 100644
--- a/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/__snapshots__/loadIssues-test.ts.snap
+++ b/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/__snapshots__/loadIssues-test.ts.snap
@@ -24,7 +24,6 @@ Array [
"componentQualifier": "FIL",
"creationDate": "2016-08-15T15:25:38+0200",
"flows": Array [],
- "fromHotspot": true,
"hash": "78417dcee7ba927b7e7c9161e29e02b8",
"key": "AWaqVGl3tut9VbnJvk6M",
"line": 62,
diff --git a/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/loadIssues-test.ts b/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/loadIssues-test.ts
index a294f95006a..5fd555bbf6b 100644
--- a/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/loadIssues-test.ts
+++ b/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/loadIssues-test.ts
@@ -45,8 +45,7 @@ jest.mock('../../../../api/issues', () => ({
comments: [],
creationDate: '2016-08-15T15:25:38+0200',
updateDate: '2018-10-25T10:23:08+0200',
- type: 'SECURITY_HOTSPOT',
- fromHotspot: true
+ type: 'SECURITY_HOTSPOT'
}
],
components: [
diff --git a/server/sonar-web/src/main/js/components/issue/__tests__/__snapshots__/IssueView-test.tsx.snap b/server/sonar-web/src/main/js/components/issue/__tests__/__snapshots__/IssueView-test.tsx.snap
index e4ed6754c06..b6774a7e6d4 100644
--- a/server/sonar-web/src/main/js/components/issue/__tests__/__snapshots__/IssueView-test.tsx.snap
+++ b/server/sonar-web/src/main/js/components/issue/__tests__/__snapshots__/IssueView-test.tsx.snap
@@ -18,7 +18,6 @@ exports[`should render hotspots correctly 1`] = `
"componentUuid": "foo1234",
"creationDate": "2017-03-01T09:36:01+0100",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -53,7 +52,6 @@ exports[`should render hotspots correctly 1`] = `
"componentUuid": "foo1234",
"creationDate": "2017-03-01T09:36:01+0100",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -114,7 +112,6 @@ exports[`should render issues correctly 1`] = `
"componentUuid": "foo1234",
"creationDate": "2017-03-01T09:36:01+0100",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -163,7 +160,6 @@ exports[`should render issues correctly 1`] = `
"componentUuid": "foo1234",
"creationDate": "2017-03-01T09:36:01+0100",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
diff --git a/server/sonar-web/src/main/js/components/issue/__tests__/__snapshots__/issue-test.tsx.snap b/server/sonar-web/src/main/js/components/issue/__tests__/__snapshots__/issue-test.tsx.snap
index 9b2ad3a1112..383f9ff13dc 100644
--- a/server/sonar-web/src/main/js/components/issue/__tests__/__snapshots__/issue-test.tsx.snap
+++ b/server/sonar-web/src/main/js/components/issue/__tests__/__snapshots__/issue-test.tsx.snap
@@ -27,7 +27,6 @@ exports[`should render issues correctly 1`] = `
"componentUuid": "foo1234",
"creationDate": "2017-03-01T09:36:01+0100",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueMessage.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueMessage.tsx
index 985b0a154f1..0a605f6546b 100644
--- a/server/sonar-web/src/main/js/components/issue/components/IssueMessage.tsx
+++ b/server/sonar-web/src/main/js/components/issue/components/IssueMessage.tsx
@@ -31,7 +31,6 @@ export interface IssueMessageProps {
engine?: string;
quickFixAvailable?: boolean;
displayWhyIsThisAnIssue?: boolean;
- manualVulnerability: boolean;
message: string;
ruleKey: string;
ruleStatus?: RuleStatus;
@@ -41,7 +40,6 @@ export default function IssueMessage(props: IssueMessageProps) {
const {
engine,
quickFixAvailable,
- manualVulnerability,
message,
ruleKey,
ruleStatus,
@@ -97,13 +95,6 @@ export default function IssueMessage(props: IssueMessageProps) {
<div className="badge spacer-right text-baseline">{ruleEngine}</div>
</Tooltip>
)}
- {manualVulnerability && (
- <Tooltip overlay={translate('issue.manual_vulnerability.description')}>
- <div className="badge spacer-right text-baseline">
- {translate('issue.manual_vulnerability')}
- </div>
- </Tooltip>
- )}
</div>
{displayWhyIsThisAnIssue && (
<ButtonLink
diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueTitleBar.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueTitleBar.tsx
index 1e39ea8bd65..9b04445d03c 100644
--- a/server/sonar-web/src/main/js/components/issue/components/IssueTitleBar.tsx
+++ b/server/sonar-web/src/main/js/components/issue/components/IssueTitleBar.tsx
@@ -77,7 +77,6 @@ export default function IssueTitleBar(props: IssueTitleBarProps) {
engine={issue.externalRuleEngine}
quickFixAvailable={issue.quickFixAvailable}
displayWhyIsThisAnIssue={displayWhyIsThisAnIssue}
- manualVulnerability={issue.fromHotspot && issue.type === 'VULNERABILITY'}
message={issue.message}
ruleKey={issue.rule}
ruleStatus={issue.ruleStatus as RuleStatus | undefined}
diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueTransition.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueTransition.tsx
index e3bc90d7681..254b36eb5a2 100644
--- a/server/sonar-web/src/main/js/components/issue/components/IssueTransition.tsx
+++ b/server/sonar-web/src/main/js/components/issue/components/IssueTransition.tsx
@@ -31,7 +31,7 @@ import SetTransitionPopup from '../popups/SetTransitionPopup';
interface Props {
hasTransitions: boolean;
isOpen: boolean;
- issue: Pick<Issue, 'fromHotspot' | 'key' | 'resolution' | 'status' | 'transitions' | 'type'>;
+ issue: Pick<Issue, 'key' | 'resolution' | 'status' | 'transitions' | 'type'>;
onChange: (issue: Issue) => void;
togglePopup: (popup: string, show?: boolean) => void;
}
@@ -63,12 +63,7 @@ export default class IssueTransition extends React.PureComponent<Props> {
onRequestClose={this.handleClose}
open={this.props.isOpen && this.props.hasTransitions}
overlay={
- <SetTransitionPopup
- fromHotspot={issue.fromHotspot}
- onSelect={this.setTransition}
- transitions={issue.transitions}
- type={issue.type}
- />
+ <SetTransitionPopup onSelect={this.setTransition} transitions={issue.transitions} />
}>
<ButtonLink
aria-label={translateWithParameters(
diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueMessage-test.tsx b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueMessage-test.tsx
index c11c314aaa1..0147d912475 100644
--- a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueMessage-test.tsx
+++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueMessage-test.tsx
@@ -36,7 +36,6 @@ it('should render correctly', () => {
expect(shallowRender()).toMatchSnapshot('default');
expect(shallowRender({ engine: 'js' })).toMatchSnapshot('with engine info');
expect(shallowRender({ quickFixAvailable: true })).toMatchSnapshot('with quick fix');
- expect(shallowRender({ manualVulnerability: true })).toMatchSnapshot('is manual vulnerability');
expect(shallowRender({ ruleStatus: RuleStatus.Deprecated })).toMatchSnapshot(
'is deprecated rule'
);
@@ -61,7 +60,6 @@ it('should open why is this an issue workspace', () => {
function shallowRender(props: Partial<IssueMessageProps> = {}) {
return shallow<IssueMessageProps>(
<IssueMessage
- manualVulnerability={false}
message="Reduce the number of conditional operators (4) used in the expression"
displayWhyIsThisAnIssue={true}
ruleKey="javascript:S1067"
diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueTransition-test.tsx b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueTransition-test.tsx
index a0985d8ef70..52277de1b71 100644
--- a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueTransition-test.tsx
+++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueTransition-test.tsx
@@ -22,7 +22,6 @@ import * as React from 'react';
import IssueTransition from '../IssueTransition';
const issue: IssueTransition['props']['issue'] = {
- fromHotspot: false,
key: 'foo1234',
transitions: ['confirm', 'resolve', 'falsepositive', 'wontfix'],
status: 'OPEN',
@@ -33,7 +32,7 @@ it('should render without the action when there is no transitions', () => {
expect(
shallowRender({
hasTransitions: false,
- issue: { fromHotspot: false, key: 'foo1234', transitions: [], status: 'CLOSED', type: 'BUG' }
+ issue: { key: 'foo1234', transitions: [], status: 'CLOSED', type: 'BUG' }
})
).toMatchSnapshot();
});
diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueActionsBar-test.tsx.snap b/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueActionsBar-test.tsx.snap
index 2efed8970bf..958f8e72598 100644
--- a/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueActionsBar-test.tsx.snap
+++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueActionsBar-test.tsx.snap
@@ -24,7 +24,6 @@ exports[`should render commentable correctly 1`] = `
"componentUuid": "foo1234",
"creationDate": "2017-03-01T09:36:01+0100",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -67,7 +66,6 @@ exports[`should render commentable correctly 1`] = `
"componentUuid": "foo1234",
"creationDate": "2017-03-01T09:36:01+0100",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -110,7 +108,6 @@ exports[`should render commentable correctly 1`] = `
"componentUuid": "foo1234",
"creationDate": "2017-03-01T09:36:01+0100",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -153,7 +150,6 @@ exports[`should render commentable correctly 1`] = `
"componentUuid": "foo1234",
"creationDate": "2017-03-01T09:36:01+0100",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -208,7 +204,6 @@ exports[`should render commentable correctly 1`] = `
"componentUuid": "foo1234",
"creationDate": "2017-03-01T09:36:01+0100",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -261,7 +256,6 @@ exports[`should render effort correctly 1`] = `
"creationDate": "2017-03-01T09:36:01+0100",
"effort": "great",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -303,7 +297,6 @@ exports[`should render effort correctly 1`] = `
"creationDate": "2017-03-01T09:36:01+0100",
"effort": "great",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -345,7 +338,6 @@ exports[`should render effort correctly 1`] = `
"creationDate": "2017-03-01T09:36:01+0100",
"effort": "great",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -387,7 +379,6 @@ exports[`should render effort correctly 1`] = `
"creationDate": "2017-03-01T09:36:01+0100",
"effort": "great",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -442,7 +433,6 @@ exports[`should render effort correctly 1`] = `
"creationDate": "2017-03-01T09:36:01+0100",
"effort": "great",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -494,7 +484,6 @@ exports[`should render issue correctly 1`] = `
"componentUuid": "foo1234",
"creationDate": "2017-03-01T09:36:01+0100",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -535,7 +524,6 @@ exports[`should render issue correctly 1`] = `
"componentUuid": "foo1234",
"creationDate": "2017-03-01T09:36:01+0100",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -576,7 +564,6 @@ exports[`should render issue correctly 1`] = `
"componentUuid": "foo1234",
"creationDate": "2017-03-01T09:36:01+0100",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -617,7 +604,6 @@ exports[`should render issue correctly 1`] = `
"componentUuid": "foo1234",
"creationDate": "2017-03-01T09:36:01+0100",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -662,7 +648,6 @@ exports[`should render issue correctly 1`] = `
"componentUuid": "foo1234",
"creationDate": "2017-03-01T09:36:01+0100",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -714,7 +699,6 @@ exports[`should render security hotspot correctly 1`] = `
"componentUuid": "foo1234",
"creationDate": "2017-03-01T09:36:01+0100",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -755,7 +739,6 @@ exports[`should render security hotspot correctly 1`] = `
"componentUuid": "foo1234",
"creationDate": "2017-03-01T09:36:01+0100",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -796,7 +779,6 @@ exports[`should render security hotspot correctly 1`] = `
"componentUuid": "foo1234",
"creationDate": "2017-03-01T09:36:01+0100",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -841,7 +823,6 @@ exports[`should render security hotspot correctly 1`] = `
"componentUuid": "foo1234",
"creationDate": "2017-03-01T09:36:01+0100",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueMessage-test.tsx.snap b/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueMessage-test.tsx.snap
index 824d917edb0..eb1c297404f 100644
--- a/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueMessage-test.tsx.snap
+++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueMessage-test.tsx.snap
@@ -74,36 +74,6 @@ exports[`should render correctly: is deprecated rule 1`] = `
</Fragment>
`;
-exports[`should render correctly: is manual vulnerability 1`] = `
-<Fragment>
- <div
- className="display-inline-flex-center issue-message break-word"
- >
- <span
- className="spacer-right"
- >
- Reduce the number of conditional operators (4) used in the expression
- </span>
- <Tooltip
- overlay="issue.manual_vulnerability.description"
- >
- <div
- className="badge spacer-right text-baseline"
- >
- issue.manual_vulnerability
- </div>
- </Tooltip>
- </div>
- <ButtonLink
- aria-label="issue.why_this_issue.long"
- className="issue-see-rule spacer-right text-baseline"
- onClick={[Function]}
- >
- issue.why_this_issue
- </ButtonLink>
-</Fragment>
-`;
-
exports[`should render correctly: is removed rule 1`] = `
<Fragment>
<div
diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueTitleBar-test.tsx.snap b/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueTitleBar-test.tsx.snap
index 3cb4d435d76..be269fd4232 100644
--- a/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueTitleBar-test.tsx.snap
+++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueTitleBar-test.tsx.snap
@@ -6,7 +6,6 @@ exports[`should render correctly: default 1`] = `
>
<IssueMessage
engine="foo"
- manualVulnerability={false}
message="Reduce the number of conditional operators (4) used in the expression"
ruleKey="javascript:S1067"
/>
@@ -32,7 +31,6 @@ exports[`should render correctly: default 1`] = `
"creationDate": "2017-03-01T09:36:01+0100",
"externalRuleEngine": "foo",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -97,7 +95,6 @@ exports[`should render correctly: with filter 1`] = `
>
<IssueMessage
engine="foo"
- manualVulnerability={false}
message="Reduce the number of conditional operators (4) used in the expression"
ruleKey="javascript:S1067"
/>
@@ -123,7 +120,6 @@ exports[`should render correctly: with filter 1`] = `
"creationDate": "2017-03-01T09:36:01+0100",
"externalRuleEngine": "foo",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -192,7 +188,6 @@ exports[`should render correctly: with filter 1`] = `
"creationDate": "2017-03-01T09:36:01+0100",
"externalRuleEngine": "foo",
"flows": Array [],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -228,7 +223,6 @@ exports[`should render correctly: with multi locations 1`] = `
className="issue-row"
>
<IssueMessage
- manualVulnerability={false}
message="Reduce the number of conditional operators (4) used in the expression"
ruleKey="javascript:S1067"
/>
@@ -303,7 +297,6 @@ exports[`should render correctly: with multi locations 1`] = `
},
],
],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
@@ -397,7 +390,6 @@ exports[`should render correctly: with multi locations and link 1`] = `
className="issue-row"
>
<IssueMessage
- manualVulnerability={false}
message="Reduce the number of conditional operators (4) used in the expression"
ruleKey="javascript:S1067"
/>
@@ -472,7 +464,6 @@ exports[`should render correctly: with multi locations and link 1`] = `
},
],
],
- "fromHotspot": false,
"key": "AVsae-CQS-9G3txfbFN2",
"line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
diff --git a/server/sonar-web/src/main/js/components/issue/popups/SetTransitionPopup.tsx b/server/sonar-web/src/main/js/components/issue/popups/SetTransitionPopup.tsx
index faecba9de76..d63242fc68f 100644
--- a/server/sonar-web/src/main/js/components/issue/popups/SetTransitionPopup.tsx
+++ b/server/sonar-web/src/main/js/components/issue/popups/SetTransitionPopup.tsx
@@ -20,25 +20,21 @@
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
import { DropdownOverlay } from '../../../components/controls/Dropdown';
-import { hasMessage, translate } from '../../../helpers/l10n';
-import { IssueType } from '../../../types/types';
+import { translate } from '../../../helpers/l10n';
import SelectList from '../../common/SelectList';
import SelectListItem from '../../common/SelectListItem';
export interface Props {
- fromHotspot: boolean;
onSelect: (transition: string) => void;
transitions: string[];
- type: IssueType;
}
-export default function SetTransitionPopup({ fromHotspot, onSelect, transitions, type }: Props) {
- const isManualVulnerability = fromHotspot && type === 'VULNERABILITY';
+export default function SetTransitionPopup({ onSelect, transitions }: Props) {
return (
<DropdownOverlay>
<SelectList currentItem={transitions[0]} items={transitions} onSelect={onSelect}>
{transitions.map(transition => {
- const [name, description] = translateTransition(transition, isManualVulnerability);
+ const [name, description] = translateTransition(transition);
return (
<SelectListItem item={transition} key={transition} title={description}>
{name}
@@ -50,28 +46,20 @@ export default function SetTransitionPopup({ fromHotspot, onSelect, transitions,
);
}
-function translateTransition(transition: string, isManualVulnerability: boolean) {
- return isManualVulnerability && hasMessage('vulnerability.transition', transition)
- ? [
- translate('vulnerability.transition', transition),
- translate('vulnerability.transition', transition, 'description')
- ]
- : [
- translate('issue.transition', transition),
- <FormattedMessage
- key="description"
- defaultMessage={translate('issue.transition', transition, 'description')}
- id={`issue.transition.${transition}.description`}
- values={{
- community_plug_link: (
- <a
- href="https://community.sonarsource.com/"
- rel="noopener noreferrer"
- target="_blank">
- {translate('issue.transition.community_plug_link')}
- </a>
- )
- }}
- />
- ];
+function translateTransition(transition: string) {
+ return [
+ translate('issue.transition', transition),
+ <FormattedMessage
+ key="description"
+ defaultMessage={translate('issue.transition', transition, 'description')}
+ id={`issue.transition.${transition}.description`}
+ values={{
+ community_plug_link: (
+ <a href="https://community.sonarsource.com/" rel="noopener noreferrer" target="_blank">
+ {translate('issue.transition.community_plug_link')}
+ </a>
+ )
+ }}
+ />
+ ];
}
diff --git a/server/sonar-web/src/main/js/helpers/testMocks.ts b/server/sonar-web/src/main/js/helpers/testMocks.ts
index 9ca206f26fd..e666c701020 100644
--- a/server/sonar-web/src/main/js/helpers/testMocks.ts
+++ b/server/sonar-web/src/main/js/helpers/testMocks.ts
@@ -373,7 +373,6 @@ export function mockIssue(withLocations = false, overrides: Partial<Issue> = {})
componentUuid: 'foo1234',
creationDate: '2017-03-01T09:36:01+0100',
flows: [],
- fromHotspot: false,
key: 'AVsae-CQS-9G3txfbFN2',
line: 25,
message: 'Reduce the number of conditional operators (4) used in the expression',
diff --git a/server/sonar-web/src/main/js/types/types.ts b/server/sonar-web/src/main/js/types/types.ts
index 0e0b576c97f..83e2f6dd6ac 100644
--- a/server/sonar-web/src/main/js/types/types.ts
+++ b/server/sonar-web/src/main/js/types/types.ts
@@ -276,7 +276,6 @@ export interface Issue {
quickFixAvailable?: boolean;
key: string;
flows: FlowLocation[][];
- fromHotspot: boolean;
line?: number;
message: string;
project: string;
diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties
index d337af4e3ba..1bea83faca7 100644
--- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties
+++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties
@@ -829,8 +829,6 @@ issue.comment.edit=Edit comment
issue.comment.edit.cancel=Cancel editing comment
issue.comment.delete=Delete comment
issue.comment.delete_confirm_message=Do you want to delete this comment?
-issue.manual_vulnerability=Manual
-issue.manual_vulnerability.description=This Vulnerability was created from a Security Hotspot and has its own issue workflow.
issue.rule_details=Rule Details
issue.send_notifications=Send Notifications
issue.why_this_issue=Why is this an issue?
@@ -864,11 +862,6 @@ issue.transition.resetastoreview=Reset as To Review
issue.transition.resetastoreview.description=The Security Hotspot should be analyzed again
issue.tabs.code=Where is the issue?
-vulnerability.transition.resetastoreview=Reset as To Review
-vulnerability.transition.resetastoreview.description=The vulnerability can't be fixed as is and needs more details. The security hotspot needs to be reviewed again
-vulnerability.transition.resolveasreviewed=Resolve as Reviewed
-vulnerability.transition.resolveasreviewed.description=The vulnerability has been fixed. The security hotspot is considered reviewed
-
issues.action_select=Select issue
issue.set_severity=Change Severity
issue.set_type=Change Type