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

[Alerting] AddAlert flyout does not immediately update state to reflect new props #64219

Closed
justinkambic opened this issue Apr 22, 2020 · 1 comment · Fixed by #64927
Closed
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)

Comments

@justinkambic
Copy link
Contributor

Kibana version:
8.x

Elasticsearch version:
8.x

Server OS version:
macOS

Browser version:
FireFox Developer Edition 76.x

Browser OS version:
macOS

Original install method (e.g. download page, yum, from source, etc.):
from source

Describe the bug:
When attempting to swap alert ID's in the AddAlert flyout, I have noticed that the internal state does not seem to reflect the props supplied to the component immediately. On a subsequent load, the state reflects the previously-provided props. Story example:

  1. I load my app, no alert type is selected, so the flyout receives undefined as target alert type ID.
  2. I select "TLS Alert" in the UI. The alert flyout opens, having received props telling it to be visible, and display alertTypeId of tls-alert. I don't see anything selected, because the flyout is still using undefined as the alert ID.
  3. I select "TLS Alert" again. This time I do see TLS alert, because the state has updated to reflect the props provided in Step 1.
  4. I select "Monitor Status" alert. I still see TLS alert, because the state reflects the props from step 2.
  5. I select "Monitor Status" alert again. This time I see Monitor Status, because the state reflects the props from step 3.

Steps to reproduce:

You can see this issue by checking out #63913 and running it.

  1. Open the Uptime App.
  2. Attempt to define a TLS alert. See that TLS alert is not pre-selected when the flyout loads.
  3. Attempt to define a TLS alert again. This time you see TLS alert.
  4. Attempt to define a Monitor Status alert. You still see TLS alert.
  5. Attempt to define a Monitor Status alert again. You see Monitor Status alert.

Expected behavior:
The selected alert type should always display the first time it is selected.

Screenshots (if relevant):

Apr-22-2020 13-25-21

Errors in browser console (if relevant):
N/A

Provide logs and/or server output (if relevant):
N/A

Any additional context:
N/A

@justinkambic justinkambic added bug Fixes for quality problems that affect the customer experience Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) labels Apr 22, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-alerting-services (Team:Alerting Services)

@YulNaumenko YulNaumenko self-assigned this Apr 29, 2020
@kobelb kobelb added the needs-team Issues missing a team label label Jan 31, 2022
@botelastic botelastic bot removed the needs-team Issues missing a team label label Jan 31, 2022
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 Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants