-
Notifications
You must be signed in to change notification settings - Fork 84
[BUG] Double sorting in saved search cause csv report failure #84
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When saved search is saved with double sorting, the logic fails to genereate csv. Single sorting doesn't have any issue though.
- Error message
{"statusCode":500,"error":"Internal Server Error","message":"_order.toLowerCase is not a function"}
- Root cause
The following code will throw error if double sorting exists in the saved search- input(double sorting in metadata)
"sort": [ [ "event.dateTime", "desc" ], [ "client.user_id", "asc" ] ], - code with bug https://github.com/opensearch-project/dashboards-reports/blob/dev/dashboards-reports/server/routes/utils/dataReportHelpers.ts#L151-L160
- input(double sorting in metadata)
To Reproduce
Steps to reproduce the behavior:
- open a saved search in Discover
- Add double sorting on 2 fields
- save that search again
Expected behavior
report being generaeted with corrrect sorting
Plugins
Please list all plugins currently enabled.
Screenshots
If applicable, add screenshots to help explain your problem.
Host/Environment (please complete the following information):
- OS: [e.g. iOS]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working