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

[8.x] [ResponseOps][Alerting] Show missing Slack connectors in the new rule form (#202315) #202934

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

… form (elastic#202315)

Closes elastic#201673

## Summary

- changed the logic to create the connectorsMap (which gives us the
connector type filters):
- Only the '**slack'** and **'slack API'** connector types include a
`subtype` array. I updated the logic so that when the `actionTypeModel`
has **hideInUi** set to true (indicating a 'slack API' connector), it
searches for a **'slack'** connector in the subtype. If a **'slack'**
connector is found, `otherActionTypeId` is set to 'slack'; otherwise, it
is set to `undefined`. This effectively "maps" the 'slack API' type to
the 'slack' type within the `connectorsMap`

- changed the logic to create the `filteredConnectors` (which gives us
the connectors to display, filtered after the type):
- The **selectedConnectorType** can only be '**slack'** because, in the
`connectorsMap`, the '**slack API'** option has already been mapped to
'**slack'** and is no longer included as a separate type.
- If the `subtype` includes **'slack',** the filter will return
connectors with `actionTypeId` of either 'slack' or 'slack API'.
- This ensures that both 'slack' and 'slack API' connectors are
displayed, as 'slack API' is associated with the 'slack' type through
the subtype.

https://github.com/user-attachments/assets/9cccaf42-b6db-4eea-b2fd-8f37f0e24745

## Release note
Fix Slack API connectors not displayed under Slack connector type when
adding new connector to rule.

(cherry picked from commit 2884d90)
@kibanamachine kibanamachine merged commit 0d1d013 into elastic:8.x Dec 4, 2024
11 checks passed
@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
triggersActionsUi 1.7MB 1.7MB +203.0B

cc @georgianaonoleata1904

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants