Describe the bug
In Discover, if choose "Today" for time range, csv report couldn't generate. The request will not even be successfully sent to backend for execution.
-
Error log in browser
context_menu_helpers.js:47 Uncaught TypeError: Cannot read property 'diff' of undefined
at getTimeFieldsFromUrl (context_menu_helpers.js:47)
at HTMLButtonElement.<anonymous> (context_menu.js:163)
at HTMLDocument.dispatch (jquery.js:5429)
at HTMLDocument.elemData.handle (jquery.js:5233)
-
Root Cause
If set to "Today", we fail to get time range from url, becuase in the time field of url, it will be
....time:(from:now%2Fd,to:now%2Fd))...
-
Comparing to for example "Last 24 hours"
time:(from:now-24h,to:now)
The logic actually converting start and end time to absolute data and time, then calculate the math diff and use as timeduration in ISO format. But for Today case, the converted time range will be same for start and end.
To Reproduce
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior
A clear and concise description of what you expected to happen.
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.
Describe the bug
In Discover, if choose "Today" for time range, csv report couldn't generate. The request will not even be successfully sent to backend for execution.
Error log in browser
Root Cause
If set to "Today", we fail to get time range from url, becuase in the time field of url, it will be
Comparing to for example "Last 24 hours"
The logic actually converting start and end time to absolute data and time, then calculate the math diff and use as timeduration in ISO format. But for
Todaycase, the converted time range will be same for start and end.To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Plugins
Please list all plugins currently enabled.
Screenshots
If applicable, add screenshots to help explain your problem.
Host/Environment (please complete the following information):
Additional context
Add any other context about the problem here.