[DOCS][Cases] Custom fields general availability (#188598)

This commit is contained in:
Lisa Cawley 2024-07-18 09:10:24 -07:00 committed by GitHub
parent 40b966c0c8
commit aa108edcef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 40 additions and 116 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 346 KiB

View file

@ -7,6 +7,8 @@
To change case closure options and add custom fields, templates, and connectors for external incident management systems, go to *{stack-manage-app} > Cases* and click *Settings*.
To perform these tasks, you must have <<setup-cases,full access>> to the appropriate case and connector features in {kib}.
[role="screenshot"]
image::images/cases-settings.png[View case settings]
// NOTE: This is an autogenerated screenshot. Do not edit it directly.
@ -52,6 +54,29 @@ To change the default connector for new cases, select the connector from the
To update a connector, click *Update <connector name>* and edit the connector fields as required.
[[case-custom-fields]]
=== Custom fields
You can add optional and required fields for customized case collaboration. added:[8.15.0]
To create a custom field:
. In the *Custom fields* section, click *Add field*.
+
--
[role="screenshot"]
image::images/cases-custom-fields-add.png[Add a custom field in case settings]
// NOTE: This is an autogenerated screenshot. Do not edit it directly.
--
. You must provide a field label and type (text or toggle).
You can optionally designate it as a required field and provide a default value.
When you create a custom field, it's added to all new and existing cases.
Existing cases have null values for new text fields until you set them in each case.
You can subsequently remove or edit custom fields on the *Settings* page.
[[case-templates]]
=== Templates

View file

@ -32,8 +32,7 @@ text.
. Optionally, add a category, assignees, and tags.
You can add users only if they meet the necessary <<setup-cases,prerequisites>>.
. If you defined any custom fields, they appear in the *Additional fields* section.
Check out <<case-custom-fields>>. preview:[]
. If you defined any <<case-custom-fields,custom fields>>, they appear in the *Additional fields* section. added:[8.15.0]
. For the *External incident management system*, select a connector. For more
information, refer to <<case-connectors>>.
@ -45,52 +44,6 @@ By default, the rule adds all of the alerts within a specified time window to a
You can optionally choose a field to group the alerts and create separate cases for each group.
You can also choose whether you want the rule to reopen cases or open new ones when the time window elapses.
[[case-custom-fields]]
=== Add custom fields
preview::[]
You can add optional and required fields for customized case collaboration.
. Go to *{stack-manage-app} > Cases* and click *Settings*.
+
--
[role="screenshot"]
image::images/cases-custom-fields-view.png[View custom fields in case settings]
// NOTE: This is an autogenerated screenshot. Do not edit it directly.
NOTE: To view and change case settings, you must have the appropriate {kib} feature privileges. Refer to <<setup-cases>>.
--
. In the *Custom fields* section, click *Add field*.
+
--
[role="screenshot"]
image::images/cases-custom-fields-add.png[Add a custom field in case settings]
// NOTE: This is an autogenerated screenshot. Do not edit it directly.
--
. Enter a field label.
. Choose a field type: text or toggle.
. If you want the text field to be mandatory in all cases, select *Make this field required*.
. Optionally add a default value.
. Click *Save field*.
You can subsequently remove or edit custom fields on the *Settings* page.
After you create custom fields, they're added to all new and existing cases.
Existing cases have null values for the new text fields until you set them in each case.
For example, you must click the pencil icon next to `my-field` to set it:
[role="screenshot"]
image::images/cases-custom-fields.png[A case that has an unset custom field]
// NOTE: This is an autogenerated screenshot. Do not edit it directly.
[[add-case-notifications]]
=== Add email notifications

View file

@ -1,53 +0,0 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import { FtrProviderContext } from '../../../ftr_provider_context';
export default function ({ getPageObject, getService }: FtrProviderContext) {
const cases = getService('cases');
const commonScreenshots = getService('commonScreenshots');
const find = getService('find');
const header = getPageObject('header');
const testSubjects = getService('testSubjects');
const screenshotDirectories = ['response_ops_docs', 'stack_cases'];
describe('add custom fields', function () {
it('case settings screenshot', async () => {
await cases.navigation.navigateToApp();
await cases.navigation.navigateToConfigurationPage();
await testSubjects.click('add-custom-field');
await commonScreenshots.takeScreenshot(
'cases-custom-fields-add',
screenshotDirectories,
1400,
700
);
await testSubjects.setValue('custom-field-label-input', 'my-field');
await testSubjects.click('common-flyout-save');
await commonScreenshots.takeScreenshot(
'cases-custom-fields-view',
screenshotDirectories,
1400,
1024
);
await cases.navigation.navigateToApp();
await cases.casesTable.waitForCasesToBeListed();
await cases.casesTable.goToFirstListedCase();
await header.waitUntilLoadingHasFinished();
await find.byCssSelector('[data-test-subj="no-custom-field-value"]');
await commonScreenshots.takeScreenshot(
'cases-custom-fields',
screenshotDirectories,
1400,
1400
);
await cases.navigation.navigateToApp();
await testSubjects.click('createNewCaseBtn');
await commonScreenshots.takeScreenshot('cases-create', screenshotDirectories, 1400, 1900);
await testSubjects.click('create-case-cancel');
});
});
}

View file

@ -47,7 +47,6 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) {
});
loadTestFile(require.resolve('./list_view'));
loadTestFile(require.resolve('./custom_fields'));
loadTestFile(require.resolve('./settings'));
loadTestFile(require.resolve('./details_view'));
});

View file

@ -25,20 +25,20 @@ export default function ({ getPageObject, getService }: FtrProviderContext) {
1000
);
await testSubjects.click('common-flyout-cancel');
// await testSubjects.click('add-custom-field');
// await commonScreenshots.takeScreenshot(
// 'cases-custom-fields-add',
// screenshotDirectories,
// 1400,
// 700
// );
// await testSubjects.setValue('custom-field-label-input', 'my-field');
// await testSubjects.click('common-flyout-save');
// await commonScreenshots.takeScreenshot('cases-settings', screenshotDirectories, 1400, 1024);
// await cases.navigation.navigateToApp();
// await testSubjects.click('createNewCaseBtn');
// await commonScreenshots.takeScreenshot('cases-create', screenshotDirectories, 1400, 1900);
// await testSubjects.click('create-case-cancel');
await testSubjects.click('add-custom-field');
await commonScreenshots.takeScreenshot(
'cases-custom-fields-add',
screenshotDirectories,
1400,
700
);
await testSubjects.setValue('custom-field-label-input', 'my-field');
await testSubjects.click('common-flyout-save');
await commonScreenshots.takeScreenshot('cases-settings', screenshotDirectories, 1400, 1024);
await cases.navigation.navigateToApp();
await testSubjects.click('createNewCaseBtn');
await commonScreenshots.takeScreenshot('cases-create', screenshotDirectories, 1400, 1900);
await testSubjects.click('create-case-cancel');
});
});
}