-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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] [104961] Remove conditional preventing additional comment field to be blank #117901
[Cases] [104961] Remove conditional preventing additional comment field to be blank #117901
Conversation
3a44c45
to
566ca87
Compare
Pinging @elastic/security-threat-hunting (Team:Threat Hunting) |
Pinging @elastic/security-threat-hunting-cases (Team:Threat Hunting:Cases) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix! I test all incident manager connectors and is working as expected. Code LTGM!
In the Jira connector if you add a comment and then delete it you get this error when you run the test
I think this is happening because at the begging the comment is set to undefined
. Then when you type and delete the comment is set to an empty string. It seems that Jira does not accept empty comments. I think the backend should not post a comment if it is empty (only for the Jira connector)
…f github.com:jamster10/kibana into 104961-bug-unable-to-clear-additional-comments-field
@@ -80,6 +80,9 @@ const pushToServiceHandler = async ({ | |||
if (comments && Array.isArray(comments) && comments.length > 0) { | |||
res.comments = []; | |||
for (const currentComment of comments) { | |||
if (!currentComment.comment) { | |||
break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should continue
because we need the other comments to be created in the external service.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I agree with @cnasikas here, we want to continue
rather than break
otherwise the remaining comments will be skipped.
@@ -80,6 +80,9 @@ const pushToServiceHandler = async ({ | |||
if (comments && Array.isArray(comments) && comments.length > 0) { | |||
res.comments = []; | |||
for (const currentComment of comments) { | |||
if (!currentComment.comment) { | |||
break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I agree with @cnasikas here, we want to continue
rather than break
otherwise the remaining comments will be skipped.
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @jamster10 |
…ld to be blank (elastic#117901) * Remove conditional preventing additional comment field to be blank * Remove tests for unwanted feature * Update server to prevent empty string comments * PR fix Co-authored-by: Kristof-Pierre Cummings <kristofpierre.cummings@elastic.co> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
…ld to be blank (#117901) (#119396) * Remove conditional preventing additional comment field to be blank * Remove tests for unwanted feature * Update server to prevent empty string comments * PR fix Co-authored-by: Kristof-Pierre Cummings <kristofpierre.cummings@elastic.co> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Kristof C <kpac.ja@gmail.com> Co-authored-by: Kristof-Pierre Cummings <kristofpierre.cummings@elastic.co>
…ld to be blank (#117901) * Remove conditional preventing additional comment field to be blank * Remove tests for unwanted feature * Update server to prevent empty string comments * PR fix Co-authored-by: Kristof-Pierre Cummings <kristofpierre.cummings@elastic.co> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
…ld to be blank (elastic#117901) * Remove conditional preventing additional comment field to be blank * Remove tests for unwanted feature * Update server to prevent empty string comments * PR fix Co-authored-by: Kristof-Pierre Cummings <kristofpierre.cummings@elastic.co> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
…ld to be blank (elastic#117901) * Remove conditional preventing additional comment field to be blank * Remove tests for unwanted feature * Update server to prevent empty string comments * PR fix Co-authored-by: Kristof-Pierre Cummings <kristofpierre.cummings@elastic.co> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Issue: #104961
Summary
A conditional prevented additional comments field from being blank. The fix was to remove said conditional.
Working:
Release notes
Fix inability to clear out additional comments field in connectors.