Skip to content

fix(severity): Prevent skipping severity score when equal to zero #56225

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

Merged
merged 3 commits into from
Sep 19, 2023

Conversation

lobsterkatie
Copy link
Member

@lobsterkatie lobsterkatie commented Sep 13, 2023

This fixes a potential bug in assigning severity scores to new groups wherein the score wouldn't be assigned if it was equal to 0. (Falsiness strikes again!) Since scores are currently handled as strings, this is only a hypothetical for now, but worth fixing in case we do ever treat score as a float instead.

It also adds tests for this case and applies a fix I noticed while writing said tests to an existing test. (It now checks for the severity key actually being missing from group metadata rather than severity being set to None.)

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Sep 13, 2023
@codecov
Copy link

codecov bot commented Sep 13, 2023

Codecov Report

Merging #56225 (e2dde11) into master (d004a6f) will increase coverage by 0.01%.
Report is 3 commits behind head on master.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master   #56225      +/-   ##
==========================================
+ Coverage   78.63%   78.65%   +0.01%     
==========================================
  Files        5078     5078              
  Lines      218353   218284      -69     
  Branches    36962    36953       -9     
==========================================
- Hits       171708   171695      -13     
+ Misses      41104    41044      -60     
- Partials     5541     5545       +4     
Files Changed Coverage
static/app/actionCreators/organization.tsx ø
static/app/api.tsx ø
static/app/components/avatarUploader.tsx ø
static/app/components/button.tsx ø
static/app/components/charts/baseChart.tsx ø
static/app/components/charts/utils.tsx ø
static/app/components/deprecatedforms/form.tsx ø
...tatic/app/components/deprecatedforms/formField.tsx ø
...atic/app/components/deprecatedforms/inputField.tsx ø
...c/app/components/discover/performanceCardTable.tsx ø
... and 59 more

@lobsterkatie lobsterkatie force-pushed the kmclb-fix-zero-value-severity-bug branch from 09355f3 to e2dde11 Compare September 19, 2023 01:57
@lobsterkatie lobsterkatie marked this pull request as ready for review September 19, 2023 02:52
@lobsterkatie lobsterkatie requested a review from a team as a code owner September 19, 2023 02:52
@lobsterkatie lobsterkatie merged commit 9b865e3 into master Sep 19, 2023
@lobsterkatie lobsterkatie deleted the kmclb-fix-zero-value-severity-bug branch September 19, 2023 18:08
@github-actions github-actions bot locked and limited conversation to collaborators Oct 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants