Skip to content

Commit

Permalink
[DOCS] Add custom fields to Jira connectors (elastic#180007)
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl authored Apr 5, 2024
1 parent c96b967 commit be980df
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 11 deletions.
3 changes: 3 additions & 0 deletions docs/management/connectors/action-types/jira.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ Title:: A title for the issue, used for searching the contents of the knowledge
Description:: The details about the incident.
Parent:: The ID or key of the parent issue. Only for `Subtask` issue types.
Additional comments:: Additional information for the client, such as how to troubleshoot the issue.
Additional fields::
An object that contains custom field identifiers and their values. These custom fields must comply with your Jira policies; they are not validated by the connector. For example, if a rule action does not include custom fields that are mandatory, the action might fail.


[float]
[[jira-connector-networking-configuration]]
Expand Down
Binary file modified docs/management/connectors/images/jira-params-test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion x-pack/plugins/actions/docs/openapi/bundled.json
Original file line number Diff line number Diff line change
Expand Up @@ -6139,6 +6139,12 @@
}
]
},
"otherFields": {
"type": "object",
"additionalProperties": true,
"maxProperties": 20,
"description": "Custom field identifiers and their values for Jira connectors.\n"
},
"parent": {
"type": "string",
"description": "The ID or key of the parent issue for Jira connectors. Applies only to `Sub-task` types of issues."
Expand Down Expand Up @@ -7207,4 +7213,4 @@
}
}
}
}
}
14 changes: 10 additions & 4 deletions x-pack/plugins/actions/docs/openapi/bundled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1724,15 +1724,15 @@ components:
type: boolean
host:
description: |
The host name of the service provider. If the `service` is `elastic_cloud` (for Elastic Cloud notifications) or one of Nodemailer's well-known email service providers, this property is ignored. If `service` is `other`, this property must be defined.
The host name of the service provider. If the `service` is `elastic_cloud` (for Elastic Cloud notifications) or one of Nodemailer's well-known email service providers, this property is ignored. If `service` is `other`, this property must be defined.
type: string
oauthTokenUrl:
type:
- string
- 'null'
port:
description: |
The port to connect to on the service provider. If the `service` is `elastic_cloud` (for Elastic Cloud notifications) or one of Nodemailer's well-known email service providers, this property is ignored. If `service` is `other`, this property must be defined.
The port to connect to on the service provider. If the `service` is `elastic_cloud` (for Elastic Cloud notifications) or one of Nodemailer's well-known email service providers, this property is ignored. If `service` is `other`, this property must be defined.
type: integer
secure:
description: |
Expand Down Expand Up @@ -3270,7 +3270,7 @@ components:
is_preconfigured:
type: boolean
description: |
Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response.
Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response.
examples:
- false
is_system_action:
Expand Down Expand Up @@ -3724,7 +3724,7 @@ components:
items:
type: string
description: |
A list of "carbon copy" email addresses. Addresses can be specified in `user@host-name` format or in name `<user@host-name>` format
A list of "carbon copy" email addresses. Addresses can be specified in `user@host-name` format or in name `<user@host-name>` format
message:
type: string
description: The email message text. Markdown format is supported.
Expand Down Expand Up @@ -4301,6 +4301,12 @@ components:
- type: array
items:
type: string
otherFields:
type: object
additionalProperties: true
maxProperties: 20
description: |
Custom field identifiers and their values for Jira connectors.
parent:
type: string
description: The ID or key of the parent issue for Jira connectors. Applies only to `Sub-task` types of issues.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4562,4 +4562,4 @@
}
}
}
}
}
6 changes: 3 additions & 3 deletions x-pack/plugins/actions/docs/openapi/bundled_serverless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1071,15 +1071,15 @@ components:
type: boolean
host:
description: |
The host name of the service provider. If the `service` is `elastic_cloud` (for Elastic Cloud notifications) or one of Nodemailer's well-known email service providers, this property is ignored. If `service` is `other`, this property must be defined.
The host name of the service provider. If the `service` is `elastic_cloud` (for Elastic Cloud notifications) or one of Nodemailer's well-known email service providers, this property is ignored. If `service` is `other`, this property must be defined.
type: string
oauthTokenUrl:
type:
- string
- 'null'
port:
description: |
The port to connect to on the service provider. If the `service` is `elastic_cloud` (for Elastic Cloud notifications) or one of Nodemailer's well-known email service providers, this property is ignored. If `service` is `other`, this property must be defined.
The port to connect to on the service provider. If the `service` is `elastic_cloud` (for Elastic Cloud notifications) or one of Nodemailer's well-known email service providers, this property is ignored. If `service` is `other`, this property must be defined.
type: integer
secure:
description: |
Expand Down Expand Up @@ -2617,7 +2617,7 @@ components:
is_preconfigured:
type: boolean
description: |
Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response.
Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response.
examples:
- false
is_system_action:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ properties:
- type: array
items:
type: string
otherFields:
type: object
additionalProperties: true
maxProperties: 20
description: >
Custom field identifiers and their values for Jira connectors.
parent:
type: string
description: The ID or key of the parent issue for Jira connectors. Applies only to `Sub-task` types of issues.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ const JiraParamsFields: React.FunctionComponent<ActionParamsProps<JiraActionPara
'xpack.stackConnectors.components.jira.otherFieldsHelpText',
{
defaultMessage:
'When adding custom fields, please note that the system does not validate inputs or enforce required fields. To avoid failed actions, ensure compliance with Jira policies.',
'Custom fields are not validated by the connector. To avoid failed actions, ensure compliance with your Jira policies.',
}
)}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const pageObjects = getPageObjects(['common', 'header']);
const actions = getService('actions');
const testSubjects = getService('testSubjects');

const additionalFields = `{\n` + `"my_custom_field_id": "custom_field_value"`;
describe('jira connector', function () {
beforeEach(async () => {
await pageObjects.common.navigateToApp('connectors');
Expand All @@ -32,6 +32,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await commonScreenshots.takeScreenshot('jira-connector', screenshotDirectories);
await testSubjects.click('create-connector-flyout-save-test-btn');
await testSubjects.click('toastCloseButton');
const editor = await testSubjects.find('kibanaCodeEditor');
await editor.clearValue();
await testSubjects.setValue('kibanaCodeEditor', additionalFields, {
clearWithKeyboard: true,
});
await commonScreenshots.takeScreenshot('jira-params-test', screenshotDirectories);
await testSubjects.click('euiFlyoutCloseButton');
});
Expand Down

0 comments on commit be980df

Please sign in to comment.