-
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] Update custom field error toast message #175197
Merged
adcoelho
merged 3 commits into
elastic:custom-fields-default-values
from
adcoelho:error-toast-custom-field-label
Jan 23, 2024
Merged
[Cases] Update custom field error toast message #175197
adcoelho
merged 3 commits into
elastic:custom-fields-default-values
from
adcoelho:error-toast-custom-field-label
Jan 23, 2024
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.13.0
labels
Jan 22, 2024
Pinging @elastic/response-ops (Team:ResponseOps) |
Pinging @elastic/response-ops-cases (Feature:Cases) |
cnasikas
approved these changes
Jan 22, 2024
adcoelho
force-pushed
the
error-toast-custom-field-label
branch
from
January 22, 2024 12:49
77512f4
to
22763ee
Compare
cnasikas
reviewed
Jan 22, 2024
💔 Build FailedFailed CI StepsMetrics [docs]
History
To update your PR or re-run it, just comment with: cc @adcoelho |
adcoelho
merged commit Jan 23, 2024
b7aab12
into
elastic:custom-fields-default-values
18 of 19 checks passed
adcoelho
added a commit
that referenced
this pull request
Feb 6, 2024
Closes #171747 Fixes #174285 Fixes #174286 Fixes #174287 Fixes #174288 Fixes #174289 ## Summary This feature branch introduces default values to the custom fields in Cases. Changes: - The case configuration API now supports defining default values **for required custom fields**. - The default value field is optional. - The default value field must have the same type as the custom field. - Default values for required custom fields can be configured in the cases settings page. - The Create and Update Case pages now prefill required custom fields with their default value(if it exists). - Create and Update case API - required custom field missing from the request: - if the default value exists -> set the custom field to the default value - if the default value is missing from the configuration -> throws an error - creating required custom fields with `value: null` -> always throws an error ### Previous PRs #174043 #174845 #174628 #175197 #175978 #175795 ## Testing I'll leave here a couple of important use cases to test: - Migration scenario 1. Create **multiple** required custom fields in 8.12. 2. Migrate to the feature branch (future 8.13). 3. Defining default values in the settings page should work as expected. - Update case UI 1. Create an optional custom field 2. Create a case and leave the custom field empty 3. Edit the custom field to now be required 4. Go to the case detail page and edit the custom field 5. Is the form populated automatically with the default value? ## Release notes Required custom fields now support default values. These default values will be used to populate automatically the custom fields if they are not defined when creating and updating cases. --------- Co-authored-by: Kibana Machine <[email protected]>
fkanout
pushed a commit
to fkanout/kibana
that referenced
this pull request
Feb 7, 2024
Closes elastic#171747 Fixes elastic#174285 Fixes elastic#174286 Fixes elastic#174287 Fixes elastic#174288 Fixes elastic#174289 ## Summary This feature branch introduces default values to the custom fields in Cases. Changes: - The case configuration API now supports defining default values **for required custom fields**. - The default value field is optional. - The default value field must have the same type as the custom field. - Default values for required custom fields can be configured in the cases settings page. - The Create and Update Case pages now prefill required custom fields with their default value(if it exists). - Create and Update case API - required custom field missing from the request: - if the default value exists -> set the custom field to the default value - if the default value is missing from the configuration -> throws an error - creating required custom fields with `value: null` -> always throws an error ### Previous PRs elastic#174043 elastic#174845 elastic#174628 elastic#175197 elastic#175978 elastic#175795 ## Testing I'll leave here a couple of important use cases to test: - Migration scenario 1. Create **multiple** required custom fields in 8.12. 2. Migrate to the feature branch (future 8.13). 3. Defining default values in the settings page should work as expected. - Update case UI 1. Create an optional custom field 2. Create a case and leave the custom field empty 3. Edit the custom field to now be required 4. Go to the case detail page and edit the custom field 5. Is the form populated automatically with the default value? ## Release notes Required custom fields now support default values. These default values will be used to populate automatically the custom fields if they are not defined when creating and updating cases. --------- Co-authored-by: Kibana Machine <[email protected]>
CoenWarmer
pushed a commit
to CoenWarmer/kibana
that referenced
this pull request
Feb 15, 2024
Closes elastic#171747 Fixes elastic#174285 Fixes elastic#174286 Fixes elastic#174287 Fixes elastic#174288 Fixes elastic#174289 ## Summary This feature branch introduces default values to the custom fields in Cases. Changes: - The case configuration API now supports defining default values **for required custom fields**. - The default value field is optional. - The default value field must have the same type as the custom field. - Default values for required custom fields can be configured in the cases settings page. - The Create and Update Case pages now prefill required custom fields with their default value(if it exists). - Create and Update case API - required custom field missing from the request: - if the default value exists -> set the custom field to the default value - if the default value is missing from the configuration -> throws an error - creating required custom fields with `value: null` -> always throws an error ### Previous PRs elastic#174043 elastic#174845 elastic#174628 elastic#175197 elastic#175978 elastic#175795 ## Testing I'll leave here a couple of important use cases to test: - Migration scenario 1. Create **multiple** required custom fields in 8.12. 2. Migrate to the feature branch (future 8.13). 3. Defining default values in the settings page should work as expected. - Update case UI 1. Create an optional custom field 2. Create a case and leave the custom field empty 3. Edit the custom field to now be required 4. Go to the case detail page and edit the custom field 5. Is the form populated automatically with the default value? ## Release notes Required custom fields now support default values. These default values will be used to populate automatically the custom fields if they are not defined when creating and updating cases. --------- Co-authored-by: Kibana Machine <[email protected]>
fkanout
pushed a commit
to fkanout/kibana
that referenced
this pull request
Mar 4, 2024
Closes elastic#171747 Fixes elastic#174285 Fixes elastic#174286 Fixes elastic#174287 Fixes elastic#174288 Fixes elastic#174289 ## Summary This feature branch introduces default values to the custom fields in Cases. Changes: - The case configuration API now supports defining default values **for required custom fields**. - The default value field is optional. - The default value field must have the same type as the custom field. - Default values for required custom fields can be configured in the cases settings page. - The Create and Update Case pages now prefill required custom fields with their default value(if it exists). - Create and Update case API - required custom field missing from the request: - if the default value exists -> set the custom field to the default value - if the default value is missing from the configuration -> throws an error - creating required custom fields with `value: null` -> always throws an error ### Previous PRs elastic#174043 elastic#174845 elastic#174628 elastic#175197 elastic#175978 elastic#175795 ## Testing I'll leave here a couple of important use cases to test: - Migration scenario 1. Create **multiple** required custom fields in 8.12. 2. Migrate to the feature branch (future 8.13). 3. Defining default values in the settings page should work as expected. - Update case UI 1. Create an optional custom field 2. Create a case and leave the custom field empty 3. Edit the custom field to now be required 4. Go to the case detail page and edit the custom field 5. Is the form populated automatically with the default value? ## Release notes Required custom fields now support default values. These default values will be used to populate automatically the custom fields if they are not defined when creating and updating cases. --------- Co-authored-by: Kibana Machine <[email protected]>
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.13.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
Merging into a feature branch.
Custom field error messages in the case configuration page now list the custom field
label
s instead ofkey
s.The message was updated for the following errors:
Additionally, the error message for custom field type errors in the cases API was also updated.
This PR fixes a bug discussed in a previous comment.
Screenshot