-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Cases] Validate length of text custom fields. #167029
Merged
adcoelho
merged 1 commit into
elastic:cases-custom-fields-feature-branch
from
adcoelho:limit-text-custom-field-160-chars
Sep 22, 2023
Merged
[Cases] Validate length of text custom fields. #167029
adcoelho
merged 1 commit into
elastic:cases-custom-fields-feature-branch
from
adcoelho:limit-text-custom-field-160-chars
Sep 22, 2023
+59
−3
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adcoelho
added
release_note:skip
Skip the PR/issue when compiling release notes
Team:ResponseOps
Label for the ResponseOps team (formerly the Cases and Alerting teams)
Feature:Cases
Cases feature
v8.11.0
labels
Sep 22, 2023
Pinging @elastic/response-ops-cases (Feature:Cases) |
💔 Build FailedFailed CI StepsTest Failures
Metrics [docs]
HistoryTo update your PR or re-run it, just comment with: cc @adcoelho |
cnasikas
approved these changes
Sep 22, 2023
adcoelho
merged commit Sep 22, 2023
661a856
into
elastic:cases-custom-fields-feature-branch
6 checks passed
This was referenced Sep 28, 2023
js-jankisalvi
added a commit
that referenced
this pull request
Oct 2, 2023
## Summary This PR implements an MPV for custom fields in Cases. Specifically: - Users can add, delete, or edit custom fields from the configuration page - Users can set custom fields when creating a case - Users can set custom fields when editing a case - Only the `Text` custom field type is supported. The `Toggle` is implemented to test the framework. - Users with a basic license can enter the configuration page and set custom fields - The configuration page header changed to "Settings" - The "Edit external connection" button changed to "Settings" - APIs: - Users cannot post custom fields with duplicate keys - Users cannot change the type of the custom field - Users cannot add custom fields that are not configured - Required fields should be present - If some of the custom fields are omitted from the request the backend will fill them with `null` values - Limits: - Maximum 10 custom fields configured - Maximum 50 chars in custom field labels - Maximum 160 chars for the value of the `Text` custom field type - Users cannot change the type of a custom field - The key of the custom fields should contain only lowercase letters (a-z), numbers (0-9), '_', and '-' - Required fields needs a value ## Testing - Cases created before custom fields are working as expected (create some on `main` before switching to the feature branch) - Environments without configuration are working as expected (clear ES data) - Environments with existing configurations are working as expected - Try to create cases with custom fields (required & optional) and delete some of them - Try to create cases with custom fields (required & optional) and then configure new custom fields. Existing cases with old custom fields should work as expected - User actions are working as expected especially with the combinations described in the previous two bullets - Users with a basic license can configure custom fields but cannot configure connectors - Users with a gold+ license can configure custom fields and connectors - Users with read access cannot configure or edit custom fields Resolves: #160236 PRs: - #165671 - #166353 - #166439 - #166483 - #166815 - #166940 - #166962 - #166969 - #166975 - #167029 - #167047 - #167105 - #167131 - #167144 - #167166 - #167167 - #167310 - #167386 - #167481 - #167495 - #167398 - #167472 ### Checklist Delete any items that are not applicable to this PR. - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [x] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ### For maintainers - [x] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) ## Release notes Allow users to configure custom fields in Cases. Supported field types: Text. Coming soon: Multi-text, List, Number, Toggle, Date, IP, Email, etc. --------- Co-authored-by: adcoelho <antonio.coelho@elastic.co> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co> Co-authored-by: Julian Gernun <17549662+jcger@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Feature:Cases
Cases feature
release_note:skip
Skip the PR/issue when compiling release notes
Team:ResponseOps
Label for the ResponseOps team (formerly the Cases and Alerting teams)
v8.11.0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR limits the length of the property value for
text
custom fields.