Skip to content

Commit 2e558d2

Browse files
committed
Remove case_type attribute
1 parent e595f8a commit 2e558d2

File tree

12 files changed

+0
-60
lines changed

12 files changed

+0
-60
lines changed

x-pack/legacy/plugins/siem/public/containers/case/types.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,10 @@ export interface NewCase extends FormData {
1313
description: string;
1414
tags: string[];
1515
title: string;
16-
case_type: string;
1716
}
1817

1918
export interface Case {
2019
case_id: string;
21-
case_type: string;
2220
created_at: string;
2321
created_by: ElasticUser;
2422
description: string;

x-pack/legacy/plugins/siem/public/containers/case/use_get_case.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ const dataFetchReducer = (state: CaseState, action: Action): CaseState => {
5151
};
5252
const initialData: Case = {
5353
case_id: '',
54-
case_type: '',
5554
created_at: '',
5655
created_by: {
5756
username: '',

x-pack/legacy/plugins/siem/public/containers/case/use_post_case.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ const dataFetchReducer = (state: NewCaseState, action: Action): NewCaseState =>
5757
}
5858
};
5959
const initialData: NewCase = {
60-
case_type: 'security',
6160
description: '',
6261
isNew: false,
6362
tags: [],

x-pack/legacy/plugins/siem/public/pages/case/components/create/form_options.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,6 @@
44
* you may not use this file except in compliance with the Elastic License.
55
*/
66

7-
export const caseTypeOptions = [
8-
{
9-
value: 'security',
10-
inputDisplay: 'Security',
11-
},
12-
{
13-
value: 'other',
14-
inputDisplay: 'Other',
15-
},
16-
];
17-
187
export const stateOptions = [
198
{
209
value: 'open',

x-pack/legacy/plugins/siem/public/pages/case/components/create/index.tsx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import { schema } from './schema';
2121
import * as i18n from '../../translations';
2222
import { SiemPageName } from '../../../home/types';
2323
import { DescriptionMarkdown } from '../description_md_editor';
24-
import { caseTypeOptions } from './form_options';
2524

2625
export const CommonUseField = getUseField({ component: Field });
2726

@@ -74,18 +73,6 @@ export const Create = React.memo(() => {
7473
isLoading={isLoading}
7574
onChange={description => setFormData({ ...data, description })}
7675
/>
77-
<CommonUseField
78-
path="case_type"
79-
componentProps={{
80-
idAria: 'caseType',
81-
'data-test-subj': 'caseType',
82-
euiFieldProps: {
83-
fullWidth: false,
84-
options: caseTypeOptions,
85-
},
86-
isDisabled: isLoading,
87-
}}
88-
/>
8976
<TagContainer>
9077
<CommonUseField
9178
path="tags"

x-pack/legacy/plugins/siem/public/pages/case/components/create/schema.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,6 @@ export const schema: FormSchema = {
2828
},
2929
],
3030
},
31-
case_type: {
32-
type: FIELD_TYPES.SUPER_SELECT,
33-
label: i18n.CASE_TYPE,
34-
validations: [
35-
{
36-
validator: emptyField(i18n.CASE_TYPE_REQUIRED),
37-
},
38-
],
39-
},
4031
tags: {
4132
type: FIELD_TYPES.COMBO_BOX,
4233
label: i18n.TAGS,

x-pack/legacy/plugins/siem/public/pages/case/translations.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,6 @@ export const CASE_TITLE = i18n.translate('xpack.siem.case.caseView.caseTitle', {
1818
defaultMessage: 'Case Title',
1919
});
2020

21-
export const CASE_TYPE = i18n.translate('xpack.siem.case.caseView.caseType', {
22-
defaultMessage: 'Case type',
23-
});
24-
25-
export const CASE_TYPE_REQUIRED = i18n.translate(
26-
'xpack.siem.case.createCase.caseTypeFieldRequiredError',
27-
{
28-
defaultMessage: 'A case type is required.',
29-
}
30-
);
31-
3221
export const CREATED_AT = i18n.translate('xpack.siem.case.caseView.createdAt', {
3322
defaultMessage: 'Created at',
3423
});

x-pack/legacy/plugins/siem/server/lib/case/saved_object_mappings.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ export const caseSavedObjectMappings: {
4545
tags: {
4646
type: 'keyword',
4747
},
48-
case_type: {
49-
type: 'keyword',
50-
},
5148
updated_at: {
5249
type: 'date',
5350
},

x-pack/plugins/case/server/routes/api/__fixtures__/mock_saved_objects.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ export const mockCases = [
1818
title: 'Super Bad Security Issue',
1919
state: 'open',
2020
tags: ['defacement'],
21-
case_type: 'security',
2221
updated_at: '2019-11-25T21:54:48.952Z',
2322
},
2423
references: [],
@@ -38,7 +37,6 @@ export const mockCases = [
3837
title: 'Damaging Data Destruction Detected',
3938
state: 'open',
4039
tags: ['Data Destruction'],
41-
case_type: 'security',
4240
updated_at: '2019-11-25T22:32:00.900Z',
4341
},
4442
references: [],
@@ -58,7 +56,6 @@ export const mockCases = [
5856
title: 'Another bad one',
5957
state: 'open',
6058
tags: ['LOLBins'],
61-
case_type: 'security',
6259
updated_at: '2019-11-25T22:32:17.947Z',
6360
},
6461
references: [],

x-pack/plugins/case/server/routes/api/__tests__/post_case.test.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ describe('POST cases', () => {
2828
title: 'Super Bad Security Issue',
2929
state: 'open',
3030
tags: ['defacement'],
31-
case_type: 'security',
3231
},
3332
});
3433

@@ -48,7 +47,6 @@ describe('POST cases', () => {
4847
title: 'Super Bad Security Issue',
4948
state: 'open',
5049
tags: ['error'],
51-
case_type: 'security',
5250
},
5351
});
5452

@@ -69,7 +67,6 @@ describe('POST cases', () => {
6967
title: 'Super Bad Security Issue',
7068
state: 'open',
7169
tags: ['defacement'],
72-
case_type: 'security',
7370
},
7471
});
7572

0 commit comments

Comments
 (0)