Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.x] [ResponseOps][Alerting] Show missing Slack connectors in the ne…
…w rule form (elastic#202315) (elastic#202934) # Backport This will backport the following commits from `main` to `8.x`: - [[ResponseOps][Alerting] Show missing Slack connectors in the new rule form (elastic#202315)](elastic#202315) <!--- 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-12-04T14:05:38Z","message":"[ResponseOps][Alerting] Show missing Slack connectors in the new rule form (elastic#202315)\n\nCloses https://github.com/elastic/kibana/issues/201673\r\n\r\n## Summary\r\n\r\n- changed the logic to create the connectorsMap (which gives us the\r\nconnector type filters):\r\n- Only the '**slack'** and **'slack API'** connector types include a\r\n`subtype` array. I updated the logic so that when the `actionTypeModel`\r\nhas **hideInUi** set to true (indicating a 'slack API' connector), it\r\nsearches for a **'slack'** connector in the subtype. If a **'slack'**\r\nconnector is found, `otherActionTypeId` is set to 'slack'; otherwise, it\r\nis set to `undefined`. This effectively \"maps\" the 'slack API' type to\r\nthe 'slack' type within the `connectorsMap`\r\n\r\n- changed the logic to create the `filteredConnectors` (which gives us\r\nthe connectors to display, filtered after the type):\r\n- The **selectedConnectorType** can only be '**slack'** because, in the\r\n`connectorsMap`, the '**slack API'** option has already been mapped to\r\n'**slack'** and is no longer included as a separate type.\r\n- If the `subtype` includes **'slack',** the filter will return\r\nconnectors with `actionTypeId` of either 'slack' or 'slack API'.\r\n- This ensures that both 'slack' and 'slack API' connectors are\r\ndisplayed, as 'slack API' is associated with the 'slack' type through\r\nthe subtype.\r\n \r\n\r\n\r\nhttps://github.com/user-attachments/assets/9cccaf42-b6db-4eea-b2fd-8f37f0e24745\r\n\r\n## Release note\r\nFix Slack API connectors not displayed under Slack connector type when\r\nadding new connector to rule.","sha":"2884d903de43c5f846a96385215b303397826973","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","Team:ResponseOps","v9.0.0","backport:prev-minor","v8.17.0","v8.16.2"],"title":"[ResponseOps][Alerting] Show missing Slack connectors in the new rule form","number":202315,"url":"https://github.com/elastic/kibana/pull/202315","mergeCommit":{"message":"[ResponseOps][Alerting] Show missing Slack connectors in the new rule form (elastic#202315)\n\nCloses https://github.com/elastic/kibana/issues/201673\r\n\r\n## Summary\r\n\r\n- changed the logic to create the connectorsMap (which gives us the\r\nconnector type filters):\r\n- Only the '**slack'** and **'slack API'** connector types include a\r\n`subtype` array. I updated the logic so that when the `actionTypeModel`\r\nhas **hideInUi** set to true (indicating a 'slack API' connector), it\r\nsearches for a **'slack'** connector in the subtype. If a **'slack'**\r\nconnector is found, `otherActionTypeId` is set to 'slack'; otherwise, it\r\nis set to `undefined`. This effectively \"maps\" the 'slack API' type to\r\nthe 'slack' type within the `connectorsMap`\r\n\r\n- changed the logic to create the `filteredConnectors` (which gives us\r\nthe connectors to display, filtered after the type):\r\n- The **selectedConnectorType** can only be '**slack'** because, in the\r\n`connectorsMap`, the '**slack API'** option has already been mapped to\r\n'**slack'** and is no longer included as a separate type.\r\n- If the `subtype` includes **'slack',** the filter will return\r\nconnectors with `actionTypeId` of either 'slack' or 'slack API'.\r\n- This ensures that both 'slack' and 'slack API' connectors are\r\ndisplayed, as 'slack API' is associated with the 'slack' type through\r\nthe subtype.\r\n \r\n\r\n\r\nhttps://github.com/user-attachments/assets/9cccaf42-b6db-4eea-b2fd-8f37f0e24745\r\n\r\n## Release note\r\nFix Slack API connectors not displayed under Slack connector type when\r\nadding new connector to rule.","sha":"2884d903de43c5f846a96385215b303397826973"}},"sourceBranch":"main","suggestedTargetBranches":["8.17","8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202315","number":202315,"mergeCommit":{"message":"[ResponseOps][Alerting] Show missing Slack connectors in the new rule form (elastic#202315)\n\nCloses https://github.com/elastic/kibana/issues/201673\r\n\r\n## Summary\r\n\r\n- changed the logic to create the connectorsMap (which gives us the\r\nconnector type filters):\r\n- Only the '**slack'** and **'slack API'** connector types include a\r\n`subtype` array. I updated the logic so that when the `actionTypeModel`\r\nhas **hideInUi** set to true (indicating a 'slack API' connector), it\r\nsearches for a **'slack'** connector in the subtype. If a **'slack'**\r\nconnector is found, `otherActionTypeId` is set to 'slack'; otherwise, it\r\nis set to `undefined`. This effectively \"maps\" the 'slack API' type to\r\nthe 'slack' type within the `connectorsMap`\r\n\r\n- changed the logic to create the `filteredConnectors` (which gives us\r\nthe connectors to display, filtered after the type):\r\n- The **selectedConnectorType** can only be '**slack'** because, in the\r\n`connectorsMap`, the '**slack API'** option has already been mapped to\r\n'**slack'** and is no longer included as a separate type.\r\n- If the `subtype` includes **'slack',** the filter will return\r\nconnectors with `actionTypeId` of either 'slack' or 'slack API'.\r\n- This ensures that both 'slack' and 'slack API' connectors are\r\ndisplayed, as 'slack API' is associated with the 'slack' type through\r\nthe subtype.\r\n \r\n\r\n\r\nhttps://github.com/user-attachments/assets/9cccaf42-b6db-4eea-b2fd-8f37f0e24745\r\n\r\n## Release note\r\nFix Slack API connectors not displayed under Slack connector type when\r\nadding new connector to rule.","sha":"2884d903de43c5f846a96385215b303397826973"}},{"branch":"8.17","label":"v8.17.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Georgiana-Andreea Onoleață <[email protected]>
- Loading branch information