-
Notifications
You must be signed in to change notification settings - Fork 356
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
Respect days parameter when listing timeline events #4504
Conversation
Up until now, when the user requested hourly report (by selecting days selector in the UI), the code always returned only the events from the last day of selected interval. This commit fixes this by unifying the time interval construction for all types of reports, getting rid of the buggy date construction in the process.
Checked commit xlab-si@94c9796 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
@PanSpagetka Could you please look at the above change? Thanks. |
@miq-bot add_reviewer @PanSpagetka |
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 know, that there are some issues in this area, but wasn't able to reproduce them. But I test it in UI and your code works and looks nicer.
@PanSpagetka To reproduce the issue, make sure "days" is active when selecting interval and select more than one day. The actual code that is broken:
As can be seen above, single-day interval is hard-coded into start and end date construction. |
Screenshots of parameter selection are available in the bug #4504 (last two screenshots). |
@PanSpagetka I verified that after the change the query is generated properly for the whole interval and not just for a single day. |
Yeah, now I have reproduced it, good job @tadeboro @mzazrivec LGTM |
Up until now, when the user requested hourly report (by selecting days selector in the UI), the code always returned only the events from the last day of selected interval.
This commit fixes this by unifying the time interval construction for all types of reports, getting rid of the buggy date construction in the process.
Fixes #4503