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

[RAM] Slack Web API Connector Channels List Error Message Not Showing Up #155722

Closed
jcger opened this issue Apr 25, 2023 · 1 comment · Fixed by #155996
Closed

[RAM] Slack Web API Connector Channels List Error Message Not Showing Up #155722

jcger opened this issue Apr 25, 2023 · 1 comment · Fixed by #155996
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)

Comments

@jcger
Copy link
Contributor

jcger commented Apr 25, 2023

Steps to reproduce:

  • Clean all slack connectors you might have created before
  • Create a new rule adding a new slack web api connector (use a valid token)
  • Submit

Expected:

  • It should show an error message so the user knows that they have to choose a channel from the channel list field (see "Selected channel is required" error message in screenshot)

Behaviour:

  • It doesn't show the error message giving no feedback to the user

Screenshot 9

@jcger jcger added the bug Fixes for quality problems that affect the customer experience label Apr 25, 2023
@jcger jcger self-assigned this Apr 25, 2023
@botelastic botelastic bot added the needs-team Issues missing a team label label Apr 25, 2023
@jcger jcger added the Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) label Apr 25, 2023
@botelastic botelastic bot removed the needs-team Issues missing a team label label Apr 25, 2023
@elasticmachine
Copy link
Contributor

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

@jcger jcger moved this from Awaiting Triage to In Progress in AppEx: ResponseOps - Rules & Alerts Management Apr 27, 2023
@jcger jcger moved this from In Progress to In Review in AppEx: ResponseOps - Rules & Alerts Management May 2, 2023
jcger added a commit that referenced this issue May 2, 2023
… Up (#155996)

Fixes #155722

Adds an integration test that loads the ActionForm using SlackApi
connector so we can check that the right error message is shown

---------

Co-authored-by: Xavier Mouligneau <xavier.mouligneau@elastic.co>
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue May 2, 2023
… Up (elastic#155996)

Fixes elastic#155722

Adds an integration test that loads the ActionForm using SlackApi
connector so we can check that the right error message is shown

---------

Co-authored-by: Xavier Mouligneau <xavier.mouligneau@elastic.co>
(cherry picked from commit e62581f)
kibanamachine referenced this issue May 2, 2023
…howing Up (#155996) (#156342)

# Backport

This will backport the following commits from `main` to `8.8`:
- [[RAM] Slack Web API Connector Channels List Error Message Not Showing
Up (#155996)](#155996)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Julian
Gernun","email":"17549662+jcger@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-05-02T09:28:56Z","message":"[RAM]
Slack Web API Connector Channels List Error Message Not Showing Up
(#155996)\n\nFixes
https://github.com/elastic/kibana/issues/155722\r\n\r\nAdds an
integration test that loads the ActionForm using SlackApi\r\nconnector
so we can check that the right error message is
shown\r\n\r\n---------\r\n\r\nCo-authored-by: Xavier Mouligneau
<xavier.mouligneau@elastic.co>","sha":"e62581f8bf6098f2813768af2f31647c592645a2","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:ResponseOps","v8.8.0","v8.9.0"],"number":155996,"url":"https://github.com/elastic/kibana/pull/155996","mergeCommit":{"message":"[RAM]
Slack Web API Connector Channels List Error Message Not Showing Up
(#155996)\n\nFixes
https://github.com/elastic/kibana/issues/155722\r\n\r\nAdds an
integration test that loads the ActionForm using SlackApi\r\nconnector
so we can check that the right error message is
shown\r\n\r\n---------\r\n\r\nCo-authored-by: Xavier Mouligneau
<xavier.mouligneau@elastic.co>","sha":"e62581f8bf6098f2813768af2f31647c592645a2"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/155996","number":155996,"mergeCommit":{"message":"[RAM]
Slack Web API Connector Channels List Error Message Not Showing Up
(#155996)\n\nFixes
https://github.com/elastic/kibana/issues/155722\r\n\r\nAdds an
integration test that loads the ActionForm using SlackApi\r\nconnector
so we can check that the right error message is
shown\r\n\r\n---------\r\n\r\nCo-authored-by: Xavier Mouligneau
<xavier.mouligneau@elastic.co>","sha":"e62581f8bf6098f2813768af2f31647c592645a2"}}]}]
BACKPORT-->

Co-authored-by: Julian Gernun <17549662+jcger@users.noreply.github.com>
jcger added a commit that referenced this issue Apr 25, 2024
## Summary

We were overwriting the `actionTypeId` of the first action in the
"create connector" callback. The value assigned was the `actionTypeId`
of the newly created action, meaning that we would have converted the
first action to be the same as the second one. This fix changes the
`actionTypeId` not for the first option but for all current
`activeActionItem.indices`.

Previously, we did add that override to fix a bug related to the slack
connector #155722. Its test
should cover us from breaking it back again. I did test it manually just
in case and it seems to be working still. Feel free to test it too.

Also, if you are wondering why `activeActionItems.indices` is an array
of numbers. The user might be using the same connector in more than one
action and then delete the connector. In case this happens, and the user
clicks on "edit rule", they will be able to restore both actions by just
creating the connector once. In order to be able to restore all affected
actions, their index is being stored as a number[]. More info here
#86838

Closes #181407

---------

Co-authored-by: Antonio <antoniodcoelho@gmail.com>
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Apr 25, 2024
…c#181604)

## Summary

We were overwriting the `actionTypeId` of the first action in the
"create connector" callback. The value assigned was the `actionTypeId`
of the newly created action, meaning that we would have converted the
first action to be the same as the second one. This fix changes the
`actionTypeId` not for the first option but for all current
`activeActionItem.indices`.

Previously, we did add that override to fix a bug related to the slack
connector elastic#155722. Its test
should cover us from breaking it back again. I did test it manually just
in case and it seems to be working still. Feel free to test it too.

Also, if you are wondering why `activeActionItems.indices` is an array
of numbers. The user might be using the same connector in more than one
action and then delete the connector. In case this happens, and the user
clicks on "edit rule", they will be able to restore both actions by just
creating the connector once. In order to be able to restore all affected
actions, their index is being stored as a number[]. More info here
elastic#86838

Closes elastic#181407

---------

Co-authored-by: Antonio <antoniodcoelho@gmail.com>
(cherry picked from commit 60c6cdb)
kibanamachine added a commit that referenced this issue Apr 25, 2024
…181604) (#181691)

# Backport

This will backport the following commits from `main` to `8.14`:
- [[MGMTEX] Fix action data override when adding a second action
(#181604)](#181604)

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

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

<!--BACKPORT [{"author":{"name":"Julian
Gernun","email":"17549662+jcger@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-04-25T10:42:28Z","message":"[MGMTEX]
Fix action data override when adding a second action (#181604)\n\n##
Summary\r\n\r\nWe were overwriting the `actionTypeId` of the first
action in the\r\n\"create connector\" callback. The value assigned was
the `actionTypeId`\r\nof the newly created action, meaning that we would
have converted the\r\nfirst action to be the same as the second one.
This fix changes the\r\n`actionTypeId` not for the first option but for
all current\r\n`activeActionItem.indices`.\r\n\r\nPreviously, we did add
that override to fix a bug related to the slack\r\nconnector
#155722. Its test\r\nshould
cover us from breaking it back again. I did test it manually just\r\nin
case and it seems to be working still. Feel free to test it
too.\r\n\r\nAlso, if you are wondering why `activeActionItems.indices`
is an array\r\nof numbers. The user might be using the same connector in
more than one\r\naction and then delete the connector. In case this
happens, and the user\r\nclicks on \"edit rule\", they will be able to
restore both actions by just\r\ncreating the connector once. In order to
be able to restore all affected\r\nactions, their index is being stored
as a number[]. More info
here\r\nhttps://github.com//pull/86838\r\n\r\nCloses
https://github.com/elastic/kibana/issues/181407\r\n\r\n---------\r\n\r\nCo-authored-by:
Antonio
<antoniodcoelho@gmail.com>","sha":"60c6cdb9985570a6f58bbf3860539de64ace9aa6","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:ResponseOps","Feature:Alerting/RuleActions","v8.13.0","v8.14.0","v8.15.0"],"title":"[MGMTEX]
Fix action data override when adding a second
action","number":181604,"url":"https://github.com/elastic/kibana/pull/181604","mergeCommit":{"message":"[MGMTEX]
Fix action data override when adding a second action (#181604)\n\n##
Summary\r\n\r\nWe were overwriting the `actionTypeId` of the first
action in the\r\n\"create connector\" callback. The value assigned was
the `actionTypeId`\r\nof the newly created action, meaning that we would
have converted the\r\nfirst action to be the same as the second one.
This fix changes the\r\n`actionTypeId` not for the first option but for
all current\r\n`activeActionItem.indices`.\r\n\r\nPreviously, we did add
that override to fix a bug related to the slack\r\nconnector
#155722. Its test\r\nshould
cover us from breaking it back again. I did test it manually just\r\nin
case and it seems to be working still. Feel free to test it
too.\r\n\r\nAlso, if you are wondering why `activeActionItems.indices`
is an array\r\nof numbers. The user might be using the same connector in
more than one\r\naction and then delete the connector. In case this
happens, and the user\r\nclicks on \"edit rule\", they will be able to
restore both actions by just\r\ncreating the connector once. In order to
be able to restore all affected\r\nactions, their index is being stored
as a number[]. More info
here\r\nhttps://github.com//pull/86838\r\n\r\nCloses
https://github.com/elastic/kibana/issues/181407\r\n\r\n---------\r\n\r\nCo-authored-by:
Antonio
<antoniodcoelho@gmail.com>","sha":"60c6cdb9985570a6f58bbf3860539de64ace9aa6"}},"sourceBranch":"main","suggestedTargetBranches":["8.13","8.14"],"targetPullRequestStates":[{"branch":"8.13","label":"v8.13.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.14","label":"v8.14.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.15.0","branchLabelMappingKey":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/181604","number":181604,"mergeCommit":{"message":"[MGMTEX]
Fix action data override when adding a second action (#181604)\n\n##
Summary\r\n\r\nWe were overwriting the `actionTypeId` of the first
action in the\r\n\"create connector\" callback. The value assigned was
the `actionTypeId`\r\nof the newly created action, meaning that we would
have converted the\r\nfirst action to be the same as the second one.
This fix changes the\r\n`actionTypeId` not for the first option but for
all current\r\n`activeActionItem.indices`.\r\n\r\nPreviously, we did add
that override to fix a bug related to the slack\r\nconnector
#155722. Its test\r\nshould
cover us from breaking it back again. I did test it manually just\r\nin
case and it seems to be working still. Feel free to test it
too.\r\n\r\nAlso, if you are wondering why `activeActionItems.indices`
is an array\r\nof numbers. The user might be using the same connector in
more than one\r\naction and then delete the connector. In case this
happens, and the user\r\nclicks on \"edit rule\", they will be able to
restore both actions by just\r\ncreating the connector once. In order to
be able to restore all affected\r\nactions, their index is being stored
as a number[]. More info
here\r\nhttps://github.com//pull/86838\r\n\r\nCloses
https://github.com/elastic/kibana/issues/181407\r\n\r\n---------\r\n\r\nCo-authored-by:
Antonio
<antoniodcoelho@gmail.com>","sha":"60c6cdb9985570a6f58bbf3860539de64ace9aa6"}}]}]
BACKPORT-->

Co-authored-by: Julian Gernun <17549662+jcger@users.noreply.github.com>
jcger added a commit to jcger/kibana that referenced this issue Apr 25, 2024
…c#181604)

## Summary

We were overwriting the `actionTypeId` of the first action in the
"create connector" callback. The value assigned was the `actionTypeId`
of the newly created action, meaning that we would have converted the
first action to be the same as the second one. This fix changes the
`actionTypeId` not for the first option but for all current
`activeActionItem.indices`.

Previously, we did add that override to fix a bug related to the slack
connector elastic#155722. Its test
should cover us from breaking it back again. I did test it manually just
in case and it seems to be working still. Feel free to test it too.

Also, if you are wondering why `activeActionItems.indices` is an array
of numbers. The user might be using the same connector in more than one
action and then delete the connector. In case this happens, and the user
clicks on "edit rule", they will be able to restore both actions by just
creating the connector once. In order to be able to restore all affected
actions, their index is being stored as a number[]. More info here
elastic#86838

Closes elastic#181407

---------

Co-authored-by: Antonio <antoniodcoelho@gmail.com>
(cherry picked from commit 60c6cdb)

# Conflicts:
#	x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alert_create_flyout.ts
jcger added a commit that referenced this issue Apr 25, 2024
…181604) (#181721)

# Backport

This will backport the following commits from `main` to `8.13`:
- [[MGMTEX] Fix action data override when adding a second action
(#181604)](#181604)

<!--- Backport version: 8.9.8 -->

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

<!--BACKPORT [{"author":{"name":"Julian
Gernun","email":"17549662+jcger@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-04-25T10:42:28Z","message":"[MGMTEX]
Fix action data override when adding a second action (#181604)\n\n##
Summary\r\n\r\nWe were overwriting the `actionTypeId` of the first
action in the\r\n\"create connector\" callback. The value assigned was
the `actionTypeId`\r\nof the newly created action, meaning that we would
have converted the\r\nfirst action to be the same as the second one.
This fix changes the\r\n`actionTypeId` not for the first option but for
all current\r\n`activeActionItem.indices`.\r\n\r\nPreviously, we did add
that override to fix a bug related to the slack\r\nconnector
#155722. Its test\r\nshould
cover us from breaking it back again. I did test it manually just\r\nin
case and it seems to be working still. Feel free to test it
too.\r\n\r\nAlso, if you are wondering why `activeActionItems.indices`
is an array\r\nof numbers. The user might be using the same connector in
more than one\r\naction and then delete the connector. In case this
happens, and the user\r\nclicks on \"edit rule\", they will be able to
restore both actions by just\r\ncreating the connector once. In order to
be able to restore all affected\r\nactions, their index is being stored
as a number[]. More info
here\r\nhttps://github.com//pull/86838\r\n\r\nCloses
https://github.com/elastic/kibana/issues/181407\r\n\r\n---------\r\n\r\nCo-authored-by:
Antonio
<antoniodcoelho@gmail.com>","sha":"60c6cdb9985570a6f58bbf3860539de64ace9aa6","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:ResponseOps","Feature:Alerting/RuleActions","v8.13.0","v8.14.0","v8.15.0"],"number":181604,"url":"https://github.com/elastic/kibana/pull/181604","mergeCommit":{"message":"[MGMTEX]
Fix action data override when adding a second action (#181604)\n\n##
Summary\r\n\r\nWe were overwriting the `actionTypeId` of the first
action in the\r\n\"create connector\" callback. The value assigned was
the `actionTypeId`\r\nof the newly created action, meaning that we would
have converted the\r\nfirst action to be the same as the second one.
This fix changes the\r\n`actionTypeId` not for the first option but for
all current\r\n`activeActionItem.indices`.\r\n\r\nPreviously, we did add
that override to fix a bug related to the slack\r\nconnector
#155722. Its test\r\nshould
cover us from breaking it back again. I did test it manually just\r\nin
case and it seems to be working still. Feel free to test it
too.\r\n\r\nAlso, if you are wondering why `activeActionItems.indices`
is an array\r\nof numbers. The user might be using the same connector in
more than one\r\naction and then delete the connector. In case this
happens, and the user\r\nclicks on \"edit rule\", they will be able to
restore both actions by just\r\ncreating the connector once. In order to
be able to restore all affected\r\nactions, their index is being stored
as a number[]. More info
here\r\nhttps://github.com//pull/86838\r\n\r\nCloses
https://github.com/elastic/kibana/issues/181407\r\n\r\n---------\r\n\r\nCo-authored-by:
Antonio
<antoniodcoelho@gmail.com>","sha":"60c6cdb9985570a6f58bbf3860539de64ace9aa6"}},"sourceBranch":"main","suggestedTargetBranches":["8.13"],"targetPullRequestStates":[{"branch":"8.13","label":"v8.13.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.14","label":"v8.14.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/181691","number":181691,"state":"MERGED","mergeCommit":{"sha":"36d2b9310c5388c444f90c520b6563360caa5d99","message":"[8.14]
[MGMTEX] Fix action data override when adding a second action (#181604)
(#181691)\n\n# Backport\n\nThis will backport the following commits from
`main` to `8.14`:\n- [[MGMTEX] Fix action data override when adding a
second
action\n(#181604)](https://github.com/elastic/kibana/pull/181604)\n\n<!---
Backport version: 9.4.3 -->\n\n### Questions ?\nPlease refer to the
[Backport
tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT
[{\"author\":{\"name\":\"Julian\nGernun\",\"email\":\"17549662+jcger@users.noreply.github.com\"},\"sourceCommit\":{\"committedDate\":\"2024-04-25T10:42:28Z\",\"message\":\"[MGMTEX]\nFix
action data override when adding a second action
(#181604)\\n\\n##\nSummary\\r\\n\\r\\nWe were overwriting the
`actionTypeId` of the first\naction in the\\r\\n\\\"create connector\\\"
callback. The value assigned was\nthe `actionTypeId`\\r\\nof the newly
created action, meaning that we would\nhave converted the\\r\\nfirst
action to be the same as the second one.\nThis fix changes
the\\r\\n`actionTypeId` not for the first option but for\nall
current\\r\\n`activeActionItem.indices`.\\r\\n\\r\\nPreviously, we did
add\nthat override to fix a bug related to the
slack\\r\\nconnector\nhttps://github.com//issues/155722.
Its test\\r\\nshould\ncover us from breaking it back again. I did test
it manually just\\r\\nin\ncase and it seems to be working still. Feel
free to test it\ntoo.\\r\\n\\r\\nAlso, if you are wondering why
`activeActionItems.indices`\nis an array\\r\\nof numbers. The user might
be using the same connector in\nmore than one\\r\\naction and then
delete the connector. In case this\nhappens, and the user\\r\\nclicks on
\\\"edit rule\\\", they will be able to\nrestore both actions by
just\\r\\ncreating the connector once. In order to\nbe able to restore
all affected\\r\\nactions, their index is being stored\nas a number[].
More
info\nhere\\r\\nhttps://github.com//pull/86838\\r\\n\\r\\nCloses\nhttps://github.com//issues/181407\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:\nAntonio\n<antoniodcoelho@gmail.com>\",\"sha\":\"60c6cdb9985570a6f58bbf3860539de64ace9aa6\",\"branchLabelMapping\":{\"^v8.15.0$\":\"main\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"release_note:fix\",\"Team:ResponseOps\",\"Feature:Alerting/RuleActions\",\"v8.13.0\",\"v8.14.0\",\"v8.15.0\"],\"title\":\"[MGMTEX]\nFix
action data override when adding a
second\naction\",\"number\":181604,\"url\":\"https://github.com/elastic/kibana/pull/181604\",\"mergeCommit\":{\"message\":\"[MGMTEX]\nFix
action data override when adding a second action
(#181604)\\n\\n##\nSummary\\r\\n\\r\\nWe were overwriting the
`actionTypeId` of the first\naction in the\\r\\n\\\"create connector\\\"
callback. The value assigned was\nthe `actionTypeId`\\r\\nof the newly
created action, meaning that we would\nhave converted the\\r\\nfirst
action to be the same as the second one.\nThis fix changes
the\\r\\n`actionTypeId` not for the first option but for\nall
current\\r\\n`activeActionItem.indices`.\\r\\n\\r\\nPreviously, we did
add\nthat override to fix a bug related to the
slack\\r\\nconnector\nhttps://github.com//issues/155722.
Its test\\r\\nshould\ncover us from breaking it back again. I did test
it manually just\\r\\nin\ncase and it seems to be working still. Feel
free to test it\ntoo.\\r\\n\\r\\nAlso, if you are wondering why
`activeActionItems.indices`\nis an array\\r\\nof numbers. The user might
be using the same connector in\nmore than one\\r\\naction and then
delete the connector. In case this\nhappens, and the user\\r\\nclicks on
\\\"edit rule\\\", they will be able to\nrestore both actions by
just\\r\\ncreating the connector once. In order to\nbe able to restore
all affected\\r\\nactions, their index is being stored\nas a number[].
More
info\nhere\\r\\nhttps://github.com//pull/86838\\r\\n\\r\\nCloses\nhttps://github.com//issues/181407\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:\nAntonio\n<antoniodcoelho@gmail.com>\",\"sha\":\"60c6cdb9985570a6f58bbf3860539de64ace9aa6\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[\"8.13\",\"8.14\"],\"targetPullRequestStates\":[{\"branch\":\"8.13\",\"label\":\"v8.13.0\",\"branchLabelMappingKey\":\"^v(\\\\d+).(\\\\d+).\\\\d+$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"},{\"branch\":\"8.14\",\"label\":\"v8.14.0\",\"branchLabelMappingKey\":\"^v(\\\\d+).(\\\\d+).\\\\d+$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"},{\"branch\":\"main\",\"label\":\"v8.15.0\",\"branchLabelMappingKey\":\"^v8.15.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https://github.com/elastic/kibana/pull/181604\",\"number\":181604,\"mergeCommit\":{\"message\":\"[MGMTEX]\nFix
action data override when adding a second action
(#181604)\\n\\n##\nSummary\\r\\n\\r\\nWe were overwriting the
`actionTypeId` of the first\naction in the\\r\\n\\\"create connector\\\"
callback. The value assigned was\nthe `actionTypeId`\\r\\nof the newly
created action, meaning that we would\nhave converted the\\r\\nfirst
action to be the same as the second one.\nThis fix changes
the\\r\\n`actionTypeId` not for the first option but for\nall
current\\r\\n`activeActionItem.indices`.\\r\\n\\r\\nPreviously, we did
add\nthat override to fix a bug related to the
slack\\r\\nconnector\nhttps://github.com//issues/155722.
Its test\\r\\nshould\ncover us from breaking it back again. I did test
it manually just\\r\\nin\ncase and it seems to be working still. Feel
free to test it\ntoo.\\r\\n\\r\\nAlso, if you are wondering why
`activeActionItems.indices`\nis an array\\r\\nof numbers. The user might
be using the same connector in\nmore than one\\r\\naction and then
delete the connector. In case this\nhappens, and the user\\r\\nclicks on
\\\"edit rule\\\", they will be able to\nrestore both actions by
just\\r\\ncreating the connector once. In order to\nbe able to restore
all affected\\r\\nactions, their index is being stored\nas a number[].
More
info\nhere\\r\\nhttps://github.com//pull/86838\\r\\n\\r\\nCloses\nhttps://github.com//issues/181407\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:\nAntonio\n<antoniodcoelho@gmail.com>\",\"sha\":\"60c6cdb9985570a6f58bbf3860539de64ace9aa6\"}}]}]\nBACKPORT-->\n\nCo-authored-by:
Julian Gernun
<17549662+jcger@users.noreply.github.com>"}},{"branch":"main","label":"v8.15.0","labelRegex":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/181604","number":181604,"mergeCommit":{"message":"[MGMTEX]
Fix action data override when adding a second action (#181604)\n\n##
Summary\r\n\r\nWe were overwriting the `actionTypeId` of the first
action in the\r\n\"create connector\" callback. The value assigned was
the `actionTypeId`\r\nof the newly created action, meaning that we would
have converted the\r\nfirst action to be the same as the second one.
This fix changes the\r\n`actionTypeId` not for the first option but for
all current\r\n`activeActionItem.indices`.\r\n\r\nPreviously, we did add
that override to fix a bug related to the slack\r\nconnector
#155722. Its test\r\nshould
cover us from breaking it back again. I did test it manually just\r\nin
case and it seems to be working still. Feel free to test it
too.\r\n\r\nAlso, if you are wondering why `activeActionItems.indices`
is an array\r\nof numbers. The user might be using the same connector in
more than one\r\naction and then delete the connector. In case this
happens, and the user\r\nclicks on \"edit rule\", they will be able to
restore both actions by just\r\ncreating the connector once. In order to
be able to restore all affected\r\nactions, their index is being stored
as a number[]. More info
here\r\nhttps://github.com//pull/86838\r\n\r\nCloses
https://github.com/elastic/kibana/issues/181407\r\n\r\n---------\r\n\r\nCo-authored-by:
Antonio
<antoniodcoelho@gmail.com>","sha":"60c6cdb9985570a6f58bbf3860539de64ace9aa6"}}]}]
BACKPORT-->
kpatticha pushed a commit to kpatticha/kibana that referenced this issue Apr 26, 2024
…c#181604)

## Summary

We were overwriting the `actionTypeId` of the first action in the
"create connector" callback. The value assigned was the `actionTypeId`
of the newly created action, meaning that we would have converted the
first action to be the same as the second one. This fix changes the
`actionTypeId` not for the first option but for all current
`activeActionItem.indices`.

Previously, we did add that override to fix a bug related to the slack
connector elastic#155722. Its test
should cover us from breaking it back again. I did test it manually just
in case and it seems to be working still. Feel free to test it too.

Also, if you are wondering why `activeActionItems.indices` is an array
of numbers. The user might be using the same connector in more than one
action and then delete the connector. In case this happens, and the user
clicks on "edit rule", they will be able to restore both actions by just
creating the connector once. In order to be able to restore all affected
actions, their index is being stored as a number[]. More info here
elastic#86838

Closes elastic#181407

---------

Co-authored-by: Antonio <antoniodcoelho@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants