From c780a39b11c46ee7a675a8e1500b4e0e3d4444fd Mon Sep 17 00:00:00 2001 From: Yuliia Naumenko Date: Mon, 13 Jul 2020 18:01:08 -0700 Subject: [PATCH 01/17] Removed filtering for Case owned ServiceNow actions from the Management UI and make it usable for Alerts. Added documentation. --- docs/user/alerting/action-types.asciidoc | 5 ++ .../alerting/action-types/servicenow.asciidoc | 69 +++++++++++++++++++ .../builtin_action_types/servicenow/api.ts | 2 +- .../action_connector_form/action_form.tsx | 9 +-- .../components/actions_connectors_list.tsx | 9 +-- 5 files changed, 77 insertions(+), 17 deletions(-) create mode 100644 docs/user/alerting/action-types/servicenow.asciidoc diff --git a/docs/user/alerting/action-types.asciidoc b/docs/user/alerting/action-types.asciidoc index e8dcf689df8e4..424c3cc955434 100644 --- a/docs/user/alerting/action-types.asciidoc +++ b/docs/user/alerting/action-types.asciidoc @@ -27,6 +27,10 @@ a| <> | Send a message to a Slack channel or user. +a| <> + +| Create new ServiceNow incident. + a| <> | Send a request to a web service. @@ -55,3 +59,4 @@ include::action-types/server-log.asciidoc[] include::action-types/slack.asciidoc[] include::action-types/webhook.asciidoc[] include::action-types/pre-configured-connectors.asciidoc[] +include::action-types/servicenow.asciidoc[] diff --git a/docs/user/alerting/action-types/servicenow.asciidoc b/docs/user/alerting/action-types/servicenow.asciidoc new file mode 100644 index 0000000000000..4f6e8a02407c4 --- /dev/null +++ b/docs/user/alerting/action-types/servicenow.asciidoc @@ -0,0 +1,69 @@ +[role="xpack"] +[[servicenow-action-type]] +=== ServiceNow action + +ServiceNow action type using [V2 Table API](https://developer.servicenow.com/app.do#!/rest_api_doc?v=orlando&id=c_TableAPI) to create ServiceNow incidents. + +[float] +[[servicenow-connector-configuration]] +==== Connector configuration + +ServiceNow connectors have the following configuration properties: + +Name:: The name of the connector. The name is used to identify a connector in the management UI connector listing, or in the connector list when configuring an action. +URL:: The from address for all emails sent with this connector, specified in `user@host-name` format. +Username:: username for 'login' type authentication. +Password:: password for 'login' type authentication. + +[float] +[[Preconfigured-servicenow-configuration]] +==== Preconfigured action type + +[source,text] +-- + my-servicenow: + name: preconfigured-servicenow-action-type + actionTypeId: .servicenow + config: + apiUrl: https://dev94428.service-now.com/ + secrets: + user: testuser + password: passwordkeystorevalue +-- + +`config` defines the action type specific to the configuration and contains the following properties: + +[cols="2*<"] +|=== + +| `apiUrl` +| An address that corresponds to *Sender*. + +|=== + +`secrets` defines sensitive information for the action type: + +[cols="2*<"] +|=== + +| `user` +| A string that corresponds to *User*. + +| `password` +| A string that corresponds to *Password*. Should be stored in the <>. + +|=== + +[[servicenow-action-configuration]] +==== Action configuration + +ServiceNow actions have the following configuration properties: + +To, CC, BCC:: Each is a list of addresses. Addresses can be specified in `user@host-name` format, or in `name ` format. One of To, CC, or BCC must contain an entry. +Subject:: The subject line of the email. +Message:: The message text of the email. Markdown format is supported. + +[[configuring-servicenow]] +==== Configuring ServiceNow + +The email action can send email using many popular SMTP email services. diff --git a/x-pack/plugins/actions/server/builtin_action_types/servicenow/api.ts b/x-pack/plugins/actions/server/builtin_action_types/servicenow/api.ts index bd6f88f5efaa9..6909c7167ee70 100644 --- a/x-pack/plugins/actions/server/builtin_action_types/servicenow/api.ts +++ b/x-pack/plugins/actions/server/builtin_action_types/servicenow/api.ts @@ -53,7 +53,7 @@ const pushToServiceHandler = async ({ let incident = {}; // TODO: should be removed later but currently keep it for the Case implementation support - if (mapping) { + if (mapping && !params.externalObject) { const fields = prepareFieldsForTransformation({ externalCase: params.externalObject, mapping, diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.tsx index 7f400ee9a5db1..88f4390c059d4 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.tsx @@ -132,14 +132,7 @@ export const ActionForm = ({ try { setIsLoadingConnectors(true); const loadedConnectors = await loadConnectors({ http }); - setConnectors( - loadedConnectors.filter( - (action) => - action.actionTypeId !== ServiceNowConnectorConfiguration.id || - (action.actionTypeId === ServiceNowConnectorConfiguration.id && - !action.config.isCaseOwned) - ) - ); + setConnectors(loadedConnectors); } catch (e) { toastNotifications.addDanger({ title: i18n.translate( diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.tsx index 0e0691960729d..e324d8e906d0a 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.tsx @@ -119,14 +119,7 @@ export const ActionsConnectorsList: React.FunctionComponent = () => { setIsLoadingActions(true); try { const actionsResponse = await loadAllActions({ http }); - setActions( - actionsResponse.filter( - (action) => - action.actionTypeId !== ServiceNowConnectorConfiguration.id || - (action.actionTypeId === ServiceNowConnectorConfiguration.id && - !action.config.isCaseOwned) - ) - ); + setActions(actionsResponse); } catch (e) { toastNotifications.addDanger({ title: i18n.translate( From 1dd0965205e355bd84426026b984cf095db1ea19 Mon Sep 17 00:00:00 2001 From: Yuliia Naumenko Date: Mon, 13 Jul 2020 18:17:42 -0700 Subject: [PATCH 02/17] extended docs --- docs/user/alerting/action-types/servicenow.asciidoc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/user/alerting/action-types/servicenow.asciidoc b/docs/user/alerting/action-types/servicenow.asciidoc index 4f6e8a02407c4..d5e14ac5fc01b 100644 --- a/docs/user/alerting/action-types/servicenow.asciidoc +++ b/docs/user/alerting/action-types/servicenow.asciidoc @@ -59,9 +59,12 @@ Password:: password for 'login' type authentication. ServiceNow actions have the following configuration properties: -To, CC, BCC:: Each is a list of addresses. Addresses can be specified in `user@host-name` format, or in `name ` format. One of To, CC, or BCC must contain an entry. -Subject:: The subject line of the email. -Message:: The message text of the email. Markdown format is supported. +Urgency:: Each is a list of addresses. Addresses can be specified in `user@host-name` format, or in `name ` format. One of To, CC, or BCC must contain an entry. +Severity:: The subject line of the email. +Impact:: The message text of the email. Markdown format is supported. +Short description:: The message text of the email. Markdown format is supported. +Description:: The message text of the email. Markdown format is supported. +Additional comments:: The message text of the email. Markdown format is supported. [[configuring-servicenow]] ==== Configuring ServiceNow From 18ddca75008d9d2d2578502fb7bd7315869ba0b4 Mon Sep 17 00:00:00 2001 From: Yuliia Naumenko Date: Tue, 14 Jul 2020 11:00:58 -0700 Subject: [PATCH 03/17] Fixed docs --- docs/user/alerting/action-types.asciidoc | 2 +- .../alerting/action-types/servicenow.asciidoc | 28 +++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/user/alerting/action-types.asciidoc b/docs/user/alerting/action-types.asciidoc index 424c3cc955434..9d253c7056b85 100644 --- a/docs/user/alerting/action-types.asciidoc +++ b/docs/user/alerting/action-types.asciidoc @@ -29,7 +29,7 @@ a| <> a| <> -| Create new ServiceNow incident. +| Push or update data to a new incident in ServiceNow. a| <> diff --git a/docs/user/alerting/action-types/servicenow.asciidoc b/docs/user/alerting/action-types/servicenow.asciidoc index d5e14ac5fc01b..69a46f35ddbc2 100644 --- a/docs/user/alerting/action-types/servicenow.asciidoc +++ b/docs/user/alerting/action-types/servicenow.asciidoc @@ -2,7 +2,7 @@ [[servicenow-action-type]] === ServiceNow action -ServiceNow action type using [V2 Table API](https://developer.servicenow.com/app.do#!/rest_api_doc?v=orlando&id=c_TableAPI) to create ServiceNow incidents. +ServiceNow action type using https://developer.servicenow.com/app.do#!/rest_api_doc?v=orlando&id=c_TableAPI[V2 Table API] to create ServiceNow incidents. [float] [[servicenow-connector-configuration]] @@ -11,9 +11,9 @@ ServiceNow action type using [V2 Table API](https://developer.servicenow.com/app ServiceNow connectors have the following configuration properties: Name:: The name of the connector. The name is used to identify a connector in the management UI connector listing, or in the connector list when configuring an action. -URL:: The from address for all emails sent with this connector, specified in `user@host-name` format. -Username:: username for 'login' type authentication. -Password:: password for 'login' type authentication. +URL:: ServiceNow instance URL. +Username:: Username for HTTP Basic authentication. +Password:: Password for HTTP Basic authentication. [float] [[Preconfigured-servicenow-configuration]] @@ -27,7 +27,7 @@ Password:: password for 'login' type authentication. config: apiUrl: https://dev94428.service-now.com/ secrets: - user: testuser + username: testuser password: passwordkeystorevalue -- @@ -46,7 +46,7 @@ Password:: password for 'login' type authentication. [cols="2*<"] |=== -| `user` +| `username` | A string that corresponds to *User*. | `password` @@ -59,14 +59,14 @@ Password:: password for 'login' type authentication. ServiceNow actions have the following configuration properties: -Urgency:: Each is a list of addresses. Addresses can be specified in `user@host-name` format, or in `name ` format. One of To, CC, or BCC must contain an entry. -Severity:: The subject line of the email. -Impact:: The message text of the email. Markdown format is supported. -Short description:: The message text of the email. Markdown format is supported. -Description:: The message text of the email. Markdown format is supported. -Additional comments:: The message text of the email. Markdown format is supported. +Urgency:: The extent to which the incident's resolution can bear delay. +Severity:: The severity value of the incident. +Impact:: The effect an incident has on business. Can be measured by number of users affected or by the criticality of the business system in question. +Short description:: A short text field to describe the incident. The book icon will search the knowledge base using the contents of the short description. +Description:: The details about the incident issue in question. +Additional comments:: The additional instructions or other information meant for the client, and any work notes or steps shoudl be taken to troubleshoot the issue. [[configuring-servicenow]] -==== Configuring ServiceNow +==== Configuring and testing ServiceNow -The email action can send email using many popular SMTP email services. +ServiceNow offers free https://developer.servicenow.com/dev.do#!/guides/madrid/now-platform/pdi-guide/obtaining-a-pdi[Personal Developer Instances], which can be used to test creating of the incidents. From a750f77f4af4ebb03e4ae0fea70a428f2eda3be8 Mon Sep 17 00:00:00 2001 From: Yuliia Naumenko Date: Tue, 14 Jul 2020 11:18:53 -0700 Subject: [PATCH 04/17] fixed connector page --- .../servicenow/servicenow_connectors.tsx | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/servicenow/servicenow_connectors.tsx b/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/servicenow/servicenow_connectors.tsx index a5c4849cb63d9..139ef8fa58ff3 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/servicenow/servicenow_connectors.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/servicenow/servicenow_connectors.tsx @@ -12,9 +12,11 @@ import { EuiFormRow, EuiFieldPassword, EuiSpacer, + EuiLink, } from '@elastic/eui'; import { isEmpty } from 'lodash'; +import { FormattedMessage } from '@kbn/i18n/react'; import { ActionConnectorFieldsProps } from '../../../../types'; import * as i18n from './translations'; import { ServiceNowActionConnector, CasesConfigurationMapping } from './types'; @@ -23,7 +25,7 @@ import { FieldMapping } from './case_mappings/field_mapping'; const ServiceNowConnectorFields: React.FC> = ({ action, editActionSecrets, editActionConfig, errors, consumer }) => { +>> = ({ action, editActionSecrets, editActionConfig, errors, consumer, docLinks }) => { // TODO: remove incidentConfiguration later, when Case ServiceNow will move their fields to the level of action execution const { apiUrl, incidentConfiguration, isCaseOwned } = action.config; const mapping = incidentConfiguration ? incidentConfiguration.mapping : []; @@ -79,6 +81,17 @@ const ServiceNowConnectorFields: React.FC + + + } > - {isCaseOwned && ( // TODO: remove this block later, when Case ServiceNow will move their fields to the level of action execution + {consumer === 'case' && ( // TODO: remove this block later, when Case ServiceNow will move their fields to the level of action execution <> From 1d890f3be49576069d9908d6a2b2957671707b32 Mon Sep 17 00:00:00 2001 From: Yuliia Naumenko Date: Tue, 14 Jul 2020 11:47:42 -0700 Subject: [PATCH 05/17] Changed SN variables components --- .../servicenow/servicenow_params.tsx | 115 +++++------------- 1 file changed, 28 insertions(+), 87 deletions(-) diff --git a/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/servicenow/servicenow_params.tsx b/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/servicenow/servicenow_params.tsx index 67070b6dc8907..b06a5077893fe 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/servicenow/servicenow_params.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/servicenow/servicenow_params.tsx @@ -5,17 +5,17 @@ */ import React, { Fragment, useEffect } from 'react'; -import { EuiFormRow, EuiTextArea } from '@elastic/eui'; +import { EuiFormRow } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { EuiSelect } from '@elastic/eui'; import { EuiFlexGroup } from '@elastic/eui'; import { EuiFlexItem } from '@elastic/eui'; -import { EuiFieldText } from '@elastic/eui'; import { EuiSpacer } from '@elastic/eui'; import { EuiTitle } from '@elastic/eui'; import { ActionParamsProps } from '../../../../types'; -import { AddMessageVariables } from '../../add_message_variables'; import { ServiceNowActionParams } from './types'; +import { TextAreaWithMessageVariables } from '../../text_area_with_message_variables'; +import { TextFieldWithMessageVariables } from '../../text_field_with_message_variables'; const ServiceNowParamsFields: React.FunctionComponent { + const editSubActionProperty = (key: string, value: {}, indexVal?: number) => { const newProps = { ...actionParams.subActionParams, [key]: value }; - editAction('subActionParams', newProps, index); + editAction('subActionParams', newProps, indexVal ?? index); }; useEffect(() => { @@ -76,13 +76,6 @@ const ServiceNowParamsFields: React.FunctionComponent { - editSubActionProperty( - paramsProperty, - ((actionParams as any).subActionParams[paramsProperty] ?? '').concat(` {{${variable}}}`) - ); - }; - return ( @@ -164,96 +157,44 @@ const ServiceNowParamsFields: React.FunctionComponent onSelectMessageVariable('title', variable)} - paramsProperty="title" - /> - } > - 0 && title !== undefined} - value={title || ''} - onChange={(e: React.ChangeEvent) => { - editSubActionProperty('title', e.target.value); - }} - onBlur={() => { - if (!title) { - editSubActionProperty('title', ''); - } - }} + - - onSelectMessageVariable('description', variable) - } - paramsProperty="description" - /> - } - > - { - editSubActionProperty('description', e.target.value); - }} - onBlur={() => { - if (!description) { - editSubActionProperty('description', ''); - } - }} - /> - - + - onSelectMessageVariable('comment', variable) - } - paramsProperty="comment" - /> - } - > - { - editSubActionProperty('comment', e.target.value); - }} - onBlur={() => { - if (!comment) { - editSubActionProperty('comment', ''); - } - }} - /> - + errors={errors.comment as string[]} + /> ); }; From aa3af151b90a3859f832aa9eddc84fc4b3fce7cc Mon Sep 17 00:00:00 2001 From: Yuliia Naumenko Date: Tue, 14 Jul 2020 12:40:28 -0700 Subject: [PATCH 06/17] Fixed issues --- .../actions/server/builtin_action_types/servicenow/api.ts | 2 +- .../servicenow/servicenow_connectors.test.tsx | 1 + .../servicenow/servicenow_params.test.tsx | 4 ++-- .../builtin_action_types/servicenow/servicenow_params.tsx | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/x-pack/plugins/actions/server/builtin_action_types/servicenow/api.ts b/x-pack/plugins/actions/server/builtin_action_types/servicenow/api.ts index 6909c7167ee70..3281832941558 100644 --- a/x-pack/plugins/actions/server/builtin_action_types/servicenow/api.ts +++ b/x-pack/plugins/actions/server/builtin_action_types/servicenow/api.ts @@ -53,7 +53,7 @@ const pushToServiceHandler = async ({ let incident = {}; // TODO: should be removed later but currently keep it for the Case implementation support - if (mapping && !params.externalObject) { + if (mapping && Array.isArray(params.comments)) { const fields = prepareFieldsForTransformation({ externalCase: params.externalObject, mapping, diff --git a/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/servicenow/servicenow_connectors.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/servicenow/servicenow_connectors.test.tsx index 452d9c288926e..25381614a6c07 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/servicenow/servicenow_connectors.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/servicenow/servicenow_connectors.test.tsx @@ -72,6 +72,7 @@ describe('ServiceNowActionConnectorFields renders', () => { editActionConfig={() => {}} editActionSecrets={() => {}} docLinks={deps!.docLinks} + consumer={'case'} /> ); expect(wrapper.find('[data-test-subj="case-servicenow-mappings"]').length > 0).toBeTruthy(); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/servicenow/servicenow_params.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/servicenow/servicenow_params.test.tsx index 3ea628cd65473..1fc856b1e1ab2 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/servicenow/servicenow_params.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/servicenow/servicenow_params.test.tsx @@ -39,7 +39,7 @@ describe('ServiceNowParamsFields renders', () => { ); expect(wrapper.find('[data-test-subj="impactSelect"]').length > 0).toBeTruthy(); expect(wrapper.find('[data-test-subj="titleInput"]').length > 0).toBeTruthy(); - expect(wrapper.find('[data-test-subj="incidentDescriptionTextArea"]').length > 0).toBeTruthy(); - expect(wrapper.find('[data-test-subj="incidentCommentTextArea"]').length > 0).toBeTruthy(); + expect(wrapper.find('[data-test-subj="descriptionTextArea"]').length > 0).toBeTruthy(); + expect(wrapper.find('[data-test-subj="commentTextArea"]').length > 0).toBeTruthy(); }); }); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/servicenow/servicenow_params.tsx b/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/servicenow/servicenow_params.tsx index b06a5077893fe..1e0f4d1fdc57c 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/servicenow/servicenow_params.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/servicenow/servicenow_params.tsx @@ -52,9 +52,9 @@ const ServiceNowParamsFields: React.FunctionComponent { + const editSubActionProperty = (key: string, value: {}) => { const newProps = { ...actionParams.subActionParams, [key]: value }; - editAction('subActionParams', newProps, indexVal ?? index); + editAction('subActionParams', newProps, index); }; useEffect(() => { From 31bb00ee2444c795ee09e225892f8dfe92d7375b Mon Sep 17 00:00:00 2001 From: Yuliia Naumenko Date: Tue, 14 Jul 2020 12:42:59 -0700 Subject: [PATCH 07/17] fixed order --- docs/user/alerting/action-types.asciidoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/user/alerting/action-types.asciidoc b/docs/user/alerting/action-types.asciidoc index 9d253c7056b85..c8a0dfe56b81a 100644 --- a/docs/user/alerting/action-types.asciidoc +++ b/docs/user/alerting/action-types.asciidoc @@ -19,6 +19,10 @@ a| <> | Send an event in PagerDuty. +a| <> + +| Push or update data to a new incident in ServiceNow. + a| <> | Add a message to a Kibana log. @@ -27,10 +31,6 @@ a| <> | Send a message to a Slack channel or user. -a| <> - -| Push or update data to a new incident in ServiceNow. - a| <> | Send a request to a web service. From 38b8308ff10fb4609297284547fcc1ce12769fda Mon Sep 17 00:00:00 2001 From: Yuliia Naumenko Date: Tue, 14 Jul 2020 12:43:34 -0700 Subject: [PATCH 08/17] Update docs/user/alerting/action-types/servicenow.asciidoc Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com> --- docs/user/alerting/action-types/servicenow.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user/alerting/action-types/servicenow.asciidoc b/docs/user/alerting/action-types/servicenow.asciidoc index 69a46f35ddbc2..9815a19a19c32 100644 --- a/docs/user/alerting/action-types/servicenow.asciidoc +++ b/docs/user/alerting/action-types/servicenow.asciidoc @@ -69,4 +69,4 @@ Additional comments:: The additional instructions or other information meant fo [[configuring-servicenow]] ==== Configuring and testing ServiceNow -ServiceNow offers free https://developer.servicenow.com/dev.do#!/guides/madrid/now-platform/pdi-guide/obtaining-a-pdi[Personal Developer Instances], which can be used to test creating of the incidents. +ServiceNow offers free https://developer.servicenow.com/dev.do#!/guides/madrid/now-platform/pdi-guide/obtaining-a-pdi[Personal Developer Instances], which you can use to test incidents. From ae505ea5487451d119bef14d0f36d16255389303 Mon Sep 17 00:00:00 2001 From: Yuliia Naumenko Date: Tue, 14 Jul 2020 12:43:42 -0700 Subject: [PATCH 09/17] Update docs/user/alerting/action-types/servicenow.asciidoc Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com> --- docs/user/alerting/action-types/servicenow.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user/alerting/action-types/servicenow.asciidoc b/docs/user/alerting/action-types/servicenow.asciidoc index 9815a19a19c32..c6d297dd77301 100644 --- a/docs/user/alerting/action-types/servicenow.asciidoc +++ b/docs/user/alerting/action-types/servicenow.asciidoc @@ -64,7 +64,7 @@ Severity:: The severity value of the incident. Impact:: The effect an incident has on business. Can be measured by number of users affected or by the criticality of the business system in question. Short description:: A short text field to describe the incident. The book icon will search the knowledge base using the contents of the short description. Description:: The details about the incident issue in question. -Additional comments:: The additional instructions or other information meant for the client, and any work notes or steps shoudl be taken to troubleshoot the issue. +Additional comments:: Additional information for the client, such as how to troubleshoot the issue. [[configuring-servicenow]] ==== Configuring and testing ServiceNow From 44a36ac06a5fce5e98aee73ece19ab47a9dcfc4a Mon Sep 17 00:00:00 2001 From: Yuliia Naumenko Date: Tue, 14 Jul 2020 12:43:50 -0700 Subject: [PATCH 10/17] Update docs/user/alerting/action-types/servicenow.asciidoc Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com> --- docs/user/alerting/action-types/servicenow.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user/alerting/action-types/servicenow.asciidoc b/docs/user/alerting/action-types/servicenow.asciidoc index c6d297dd77301..dfe8221cbd095 100644 --- a/docs/user/alerting/action-types/servicenow.asciidoc +++ b/docs/user/alerting/action-types/servicenow.asciidoc @@ -63,7 +63,7 @@ Urgency:: The extent to which the incident's resolution can bear de Severity:: The severity value of the incident. Impact:: The effect an incident has on business. Can be measured by number of users affected or by the criticality of the business system in question. Short description:: A short text field to describe the incident. The book icon will search the knowledge base using the contents of the short description. -Description:: The details about the incident issue in question. +Description:: The details about the incident. Additional comments:: Additional information for the client, such as how to troubleshoot the issue. [[configuring-servicenow]] From 590cb526328b2c7a5d631d242b2a68d3c4f87f68 Mon Sep 17 00:00:00 2001 From: Yuliia Naumenko Date: Tue, 14 Jul 2020 12:43:58 -0700 Subject: [PATCH 11/17] Update docs/user/alerting/action-types/servicenow.asciidoc Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com> --- docs/user/alerting/action-types/servicenow.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user/alerting/action-types/servicenow.asciidoc b/docs/user/alerting/action-types/servicenow.asciidoc index dfe8221cbd095..af63c4b3b5f4c 100644 --- a/docs/user/alerting/action-types/servicenow.asciidoc +++ b/docs/user/alerting/action-types/servicenow.asciidoc @@ -62,7 +62,7 @@ ServiceNow actions have the following configuration properties: Urgency:: The extent to which the incident's resolution can bear delay. Severity:: The severity value of the incident. Impact:: The effect an incident has on business. Can be measured by number of users affected or by the criticality of the business system in question. -Short description:: A short text field to describe the incident. The book icon will search the knowledge base using the contents of the short description. +Short description:: A short description of the incident, used for searching the contents of the knowledge base. Description:: The details about the incident. Additional comments:: Additional information for the client, such as how to troubleshoot the issue. From feea435e3c7b8c91b7808631baf4563e4db95e44 Mon Sep 17 00:00:00 2001 From: Yuliia Naumenko Date: Tue, 14 Jul 2020 12:44:06 -0700 Subject: [PATCH 12/17] Update docs/user/alerting/action-types/servicenow.asciidoc Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com> --- docs/user/alerting/action-types/servicenow.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user/alerting/action-types/servicenow.asciidoc b/docs/user/alerting/action-types/servicenow.asciidoc index af63c4b3b5f4c..b28e3be747650 100644 --- a/docs/user/alerting/action-types/servicenow.asciidoc +++ b/docs/user/alerting/action-types/servicenow.asciidoc @@ -61,7 +61,7 @@ ServiceNow actions have the following configuration properties: Urgency:: The extent to which the incident's resolution can bear delay. Severity:: The severity value of the incident. -Impact:: The effect an incident has on business. Can be measured by number of users affected or by the criticality of the business system in question. +Impact:: The effect an incident has on business. Can be measured by the number of affected users or by how critical it is to the business in question. Short description:: A short description of the incident, used for searching the contents of the knowledge base. Description:: The details about the incident. Additional comments:: Additional information for the client, such as how to troubleshoot the issue. From 732553e2cfa12d41f53879c96b85157772923c4d Mon Sep 17 00:00:00 2001 From: Yuliia Naumenko Date: Tue, 14 Jul 2020 12:44:14 -0700 Subject: [PATCH 13/17] Update docs/user/alerting/action-types/servicenow.asciidoc Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com> --- docs/user/alerting/action-types/servicenow.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user/alerting/action-types/servicenow.asciidoc b/docs/user/alerting/action-types/servicenow.asciidoc index b28e3be747650..324812f41c1b8 100644 --- a/docs/user/alerting/action-types/servicenow.asciidoc +++ b/docs/user/alerting/action-types/servicenow.asciidoc @@ -60,7 +60,7 @@ Password:: Password for HTTP Basic authentication. ServiceNow actions have the following configuration properties: Urgency:: The extent to which the incident's resolution can bear delay. -Severity:: The severity value of the incident. +Severity:: The severity of the incident. Impact:: The effect an incident has on business. Can be measured by the number of affected users or by how critical it is to the business in question. Short description:: A short description of the incident, used for searching the contents of the knowledge base. Description:: The details about the incident. From 7174a7d49d0f36eb6a74f676685b7d93e305817d Mon Sep 17 00:00:00 2001 From: Yuliia Naumenko Date: Tue, 14 Jul 2020 12:44:20 -0700 Subject: [PATCH 14/17] Update docs/user/alerting/action-types/servicenow.asciidoc Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com> --- docs/user/alerting/action-types/servicenow.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user/alerting/action-types/servicenow.asciidoc b/docs/user/alerting/action-types/servicenow.asciidoc index 324812f41c1b8..dce12995ae8a2 100644 --- a/docs/user/alerting/action-types/servicenow.asciidoc +++ b/docs/user/alerting/action-types/servicenow.asciidoc @@ -59,7 +59,7 @@ Password:: Password for HTTP Basic authentication. ServiceNow actions have the following configuration properties: -Urgency:: The extent to which the incident's resolution can bear delay. +Urgency:: The extent to which the incident resolution can delay. Severity:: The severity of the incident. Impact:: The effect an incident has on business. Can be measured by the number of affected users or by how critical it is to the business in question. Short description:: A short description of the incident, used for searching the contents of the knowledge base. From 41881d3efaa77ce8dbec1c35acb22f8d79129223 Mon Sep 17 00:00:00 2001 From: Yuliia Naumenko Date: Tue, 14 Jul 2020 12:44:28 -0700 Subject: [PATCH 15/17] Update docs/user/alerting/action-types/servicenow.asciidoc Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com> --- docs/user/alerting/action-types/servicenow.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user/alerting/action-types/servicenow.asciidoc b/docs/user/alerting/action-types/servicenow.asciidoc index dce12995ae8a2..32f828aea2357 100644 --- a/docs/user/alerting/action-types/servicenow.asciidoc +++ b/docs/user/alerting/action-types/servicenow.asciidoc @@ -2,7 +2,7 @@ [[servicenow-action-type]] === ServiceNow action -ServiceNow action type using https://developer.servicenow.com/app.do#!/rest_api_doc?v=orlando&id=c_TableAPI[V2 Table API] to create ServiceNow incidents. +The ServiceNow action type uses the https://developer.servicenow.com/app.do#!/rest_api_doc?v=orlando&id=c_TableAPI[V2 Table API] to create ServiceNow incidents. [float] [[servicenow-connector-configuration]] From 6632c1c59911c88fe399e5f0612622ec209d8e39 Mon Sep 17 00:00:00 2001 From: Yuliia Naumenko Date: Tue, 14 Jul 2020 12:45:44 -0700 Subject: [PATCH 16/17] - --- docs/user/alerting/action-types.asciidoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/user/alerting/action-types.asciidoc b/docs/user/alerting/action-types.asciidoc index c8a0dfe56b81a..1743edb10f92b 100644 --- a/docs/user/alerting/action-types.asciidoc +++ b/docs/user/alerting/action-types.asciidoc @@ -19,14 +19,14 @@ a| <> | Send an event in PagerDuty. -a| <> - -| Push or update data to a new incident in ServiceNow. - a| <> | Add a message to a Kibana log. +a| <> + +| Push or update data to a new incident in ServiceNow. + a| <> | Send a message to a Slack channel or user. From 87f124f5b74ed4788d95f58f6d5df77d5bd006a9 Mon Sep 17 00:00:00 2001 From: Yuliia Naumenko Date: Tue, 14 Jul 2020 14:19:34 -0700 Subject: [PATCH 17/17] fixed tests --- .../actions/server/builtin_action_types/servicenow/api.test.ts | 2 +- .../application/sections/action_connector_form/action_form.tsx | 1 - .../components/actions_connectors_list.tsx | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/x-pack/plugins/actions/server/builtin_action_types/servicenow/api.test.ts b/x-pack/plugins/actions/server/builtin_action_types/servicenow/api.test.ts index 7daf14e99f254..0bb096ecd0f62 100644 --- a/x-pack/plugins/actions/server/builtin_action_types/servicenow/api.test.ts +++ b/x-pack/plugins/actions/server/builtin_action_types/servicenow/api.test.ts @@ -71,7 +71,7 @@ describe('api', () => { }); test('it calls createIncident correctly', async () => { - const params = { ...apiParams, externalId: null, comments: undefined }; + const params = { ...apiParams, externalId: null, comments: [] }; await api.pushToService({ externalService, mapping, diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.tsx index 53fdb676039a2..67c7ca91156da 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.tsx @@ -45,7 +45,6 @@ import { TypeRegistry } from '../../type_registry'; import { actionTypeCompare } from '../../lib/action_type_compare'; import { checkActionFormActionTypeEnabled } from '../../lib/check_action_type_enabled'; import { VIEW_LICENSE_OPTIONS_LINK } from '../../../common/constants'; -import { ServiceNowConnectorConfiguration } from '../../../common'; interface ActionAccordionFormProps { actions: AlertAction[]; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.tsx index e324d8e906d0a..5d52896cc628f 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.tsx @@ -20,7 +20,6 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; -import { ServiceNowConnectorConfiguration } from '../../../../common'; import { useAppDependencies } from '../../../app_context'; import { loadAllActions, loadActionTypes, deleteActions } from '../../../lib/action_connector_api'; import ConnectorAddFlyout from '../../action_connector_form/connector_add_flyout';