Skip to content
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

[ResponseOps][Cases]Allow users to push to external service when the case is closed #198146

Conversation

georgianaonoleata1904
Copy link
Contributor

@georgianaonoleata1904 georgianaonoleata1904 commented Oct 29, 2024

Closes #192552

Summary

  • Removed the restriction that didn't allow user to push a closed case to an external service.
Screen.Recording.2024-10-30.at.13.39.43.mov

@georgianaonoleata1904 georgianaonoleata1904 self-assigned this Oct 30, 2024
@georgianaonoleata1904 georgianaonoleata1904 added enhancement New value added to drive a business result release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v9.0.0 backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) v8.17.0 labels Oct 30, 2024
@georgianaonoleata1904 georgianaonoleata1904 marked this pull request as ready for review October 30, 2024 11:46
@georgianaonoleata1904 georgianaonoleata1904 requested a review from a team as a code owner October 30, 2024 11:46
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

Copy link
Contributor

@js-jankisalvi js-jankisalvi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified locally, works as expected

@@ -460,7 +438,7 @@ describe('usePushToService', () => {
const { result } = renderHook<
React.PropsWithChildren<UsePushToService>,
ReturnUsePushToService
>(() => usePushToService({ ...defaultArgs, caseStatus: CaseStatuses.closed }), {
>(() => usePushToService({ ...defaultArgs, isValidConnector: false }), {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'hasErrorMessages=true if there are error messages' so is isValidConnector: false just a different way of throwing an error?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I thought I can replace the caseStatus: CaseStatuses.closed with isValidConnector: false just to be able to throw an error in this case.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
cases 492.2KB 491.8KB -368.0B

History

cc @georgianaonoleata1904

@georgianaonoleata1904 georgianaonoleata1904 merged commit cc6ffef into elastic:main Nov 8, 2024
27 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11739585970

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 8, 2024
…case is closed (elastic#198146)

Closes elastic#192552

## Summary

- Removed the restriction that didn't allow user to push a closed case
to an external service.

https://github.com/user-attachments/assets/82c49524-5685-40c0-b025-d6b38ab4e056

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Antonio <[email protected]>
(cherry picked from commit cc6ffef)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

mbondyra pushed a commit to mbondyra/kibana that referenced this pull request Nov 8, 2024
…case is closed (elastic#198146)

Closes elastic#192552

## Summary

- Removed the restriction that didn't allow user to push a closed case
to an external service.


https://github.com/user-attachments/assets/82c49524-5685-40c0-b025-d6b38ab4e056

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Antonio <[email protected]>
kibanamachine added a commit that referenced this pull request Nov 8, 2024
…n the case is closed (#198146) (#199428)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[ResponseOps][Cases]Allow users to push to external service when the
case is closed (#198146)](#198146)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Georgiana-Andreea
Onoleață","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-08T09:32:11Z","message":"[ResponseOps][Cases]Allow
users to push to external service when the case is closed
(#198146)\n\nCloses
https://github.com/elastic/kibana/issues/192552\r\n\r\n##
Summary\r\n\r\n- Removed the restriction that didn't allow user to push
a closed case\r\nto an external
service.\r\n\r\n\r\nhttps://github.com/user-attachments/assets/82c49524-5685-40c0-b025-d6b38ab4e056\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Antonio
<[email protected]>","sha":"cc6ffef06c30134dafcd40946659d41a38f63d56","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["enhancement","release_note:skip","Team:ResponseOps","v9.0.0","backport:prev-minor","v8.17.0"],"title":"[ResponseOps][Cases]Allow
users to push to external service when the case is
closed","number":198146,"url":"https://github.com/elastic/kibana/pull/198146","mergeCommit":{"message":"[ResponseOps][Cases]Allow
users to push to external service when the case is closed
(#198146)\n\nCloses
https://github.com/elastic/kibana/issues/192552\r\n\r\n##
Summary\r\n\r\n- Removed the restriction that didn't allow user to push
a closed case\r\nto an external
service.\r\n\r\n\r\nhttps://github.com/user-attachments/assets/82c49524-5685-40c0-b025-d6b38ab4e056\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Antonio
<[email protected]>","sha":"cc6ffef06c30134dafcd40946659d41a38f63d56"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/198146","number":198146,"mergeCommit":{"message":"[ResponseOps][Cases]Allow
users to push to external service when the case is closed
(#198146)\n\nCloses
https://github.com/elastic/kibana/issues/192552\r\n\r\n##
Summary\r\n\r\n- Removed the restriction that didn't allow user to push
a closed case\r\nto an external
service.\r\n\r\n\r\nhttps://github.com/user-attachments/assets/82c49524-5685-40c0-b025-d6b38ab4e056\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Antonio
<[email protected]>","sha":"cc6ffef06c30134dafcd40946659d41a38f63d56"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Georgiana-Andreea Onoleață <[email protected]>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Nov 8, 2024
…case is closed (elastic#198146)

Closes elastic#192552

## Summary

- Removed the restriction that didn't allow user to push a closed case
to an external service.


https://github.com/user-attachments/assets/82c49524-5685-40c0-b025-d6b38ab4e056

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Antonio <[email protected]>
@kartik70rajesh
Copy link

@georgianaonoleata1904 Thank you for working on this. We faced issues sending the "Closed" case status to the external system and this should probably help with that.
Two questions here -

  • In your screen recording, the "Update Jira test incident" button stays unclickable right after closing the case. It only becomes active when a comment is added to the case. Does this mean some activity, like a comment update or tag change, is required to enable the update button?
  • The Jira ticket didn't move to the "Closed" status either—it stayed in the "To-do" state. Does the connector not send the "Closed" status to Jira?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) enhancement New value added to drive a business result 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.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Cases] Allow users to push to external service when the case is closed
6 participants