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.13] [MGMTEX] Fix action data override when adding a second action (#181604) #181721

Merged
merged 1 commit into from
Apr 25, 2024

Commits on Apr 25, 2024

  1. [MGMTEX] Fix action data override when adding a second action (elasti…

    …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 committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    743f2f1 View commit details
    Browse the repository at this point in the history