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
[Cases] Fix bug in cases bulk action in the alerts table #160526
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -146,6 +146,10 @@ export const useBulkAddToCaseActions = ({ | |
onClick: (alerts?: TimelineItem[]) => { | ||
selectCaseModal.open({ | ||
getAttachments: ({ theCase }) => { | ||
if (theCase == null) { | ||
return alerts ? casesService?.helpers.groupAlertsByRule(alerts) ?? [] : []; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't remember why but I followed the pattern used in the other action. Maybe there is a reason. I agree with you. It shouldn't be undefined. |
||
} | ||
|
||
return getCaseAttachments({ | ||
alerts, | ||
caseId: theCase.id, | ||
|
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.
An e2e test for this would also be nice if there is time. Looked a bit for them but dunno if there even are any regarding bulk actions in the alerts table.
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.
I don't think we have. Do you mind if we do it on another PR? I have this issue to track it #160240.