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
[Security Solution] Fix timeline bug receiving dataProvider value as number #159723
[Security Solution] Fix timeline bug receiving dataProvider value as number #159723
Conversation
Pinging @elastic/security-threat-hunting (Team:Threat Hunting) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pulled down the branch and tested, this fixes the bug trying to save timeline! LGTM
Thank you for fixing it so quickly! |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @semd |
…number (elastic#159723) ## Summary issue: elastic#159720 Timeline save request fails when the dataProvider value stored is a Number type. Adding the dataProvider through timeline page itself does not cause the bug. it sets a string value even if the field type is `number`. The bug only happens when using "add to timeline" CellAction on a field with type `number` ### Solution Cast the dataProvider values to a `string` before adding them to the timeline. (cherry picked from commit b9d6beb)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…ue as number (#159723) (#159775) # Backport This will backport the following commits from `main` to `8.8`: - [[Security Solution] Fix timeline bug receiving dataProvider value as number (#159723)](#159723) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Sergi Massaneda","email":"sergi.massaneda@elastic.co"},"sourceCommit":{"committedDate":"2023-06-15T08:39:45Z","message":"[Security Solution] Fix timeline bug receiving dataProvider value as number (#159723)\n\n## Summary\r\n\r\nissue: #159720 save request fails when the dataProvider value stored is a\r\nNumber type.\r\n\r\nAdding the dataProvider through timeline page itself does not cause the\r\nbug. it sets a string value even if the field type is `number`.\r\n\r\nThe bug only happens when using \"add to timeline\" CellAction on a field\r\nwith type `number`\r\n\r\n### Solution\r\n\r\nCast the dataProvider values to a `string` before adding them to the\r\ntimeline.","sha":"b9d6beb070ba60a533857616150c453cc7714237","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Threat Hunting","Team:Threat Hunting:Investigations","Team:Threat Hunting:Explore","v8.9.0","v8.8.2"],"number":159723,"url":"#159723 Solution] Fix timeline bug receiving dataProvider value as number (#159723)\n\n## Summary\r\n\r\nissue: #159720 save request fails when the dataProvider value stored is a\r\nNumber type.\r\n\r\nAdding the dataProvider through timeline page itself does not cause the\r\nbug. it sets a string value even if the field type is `number`.\r\n\r\nThe bug only happens when using \"add to timeline\" CellAction on a field\r\nwith type `number`\r\n\r\n### Solution\r\n\r\nCast the dataProvider values to a `string` before adding them to the\r\ntimeline.","sha":"b9d6beb070ba60a533857616150c453cc7714237"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"#159723 Solution] Fix timeline bug receiving dataProvider value as number (#159723)\n\n## Summary\r\n\r\nissue: #159720 save request fails when the dataProvider value stored is a\r\nNumber type.\r\n\r\nAdding the dataProvider through timeline page itself does not cause the\r\nbug. it sets a string value even if the field type is `number`.\r\n\r\nThe bug only happens when using \"add to timeline\" CellAction on a field\r\nwith type `number`\r\n\r\n### Solution\r\n\r\nCast the dataProvider values to a `string` before adding them to the\r\ntimeline.","sha":"b9d6beb070ba60a533857616150c453cc7714237"}},{"branch":"8.8","label":"v8.8.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Sergi Massaneda <sergi.massaneda@elastic.co>
Summary
issue: #159720
Timeline save request fails when the dataProvider value stored is a Number type.
Adding the dataProvider through timeline page itself does not cause the bug. it sets a string value even if the field type is
number
.The bug only happens when using "add to timeline" CellAction on a field with type
number
Solution
Cast the dataProvider values to a
string
before adding them to the timeline.