Skip to content
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

Support time in date time segment filters #7122

Open
wants to merge 9 commits into
base: staging
from

Conversation

2 participants
@kuzmany
Copy link
Contributor

kuzmany commented Jan 11, 2019

Please be sure you are submitting this against the staging branch.

Q A
Bug fix?
New feature?
Automated tests included?
Related user documentation PR URL
Related developer documentation PR URL
Issues addressed (#s or URLs)
BC breaks?
Deprecations?

Description:

Noticed segment filters query builder not respect time parts in query for relative dates (-8 hours, - 30 minutes)
That means If WE want create segment filter for datetime field and I will use custom date time field is equal like now -30 hours but less then 8 hours not work properly.
Also this update replace local timezone to UTC, because every where in segment we use toUtcString. Then If the source date is not UTC, there is conflict between times.

Example If today is 13. 1. 2019 9:23:09:

Relative datetime support for <> operators

my filter

customdatetiemfield > - 3 hours
and customdatetiemfield < - 1 hours

query:

customdatetiemfield > '2019-01-13' and customdatetiemfield < ' '2019-01-13''

after PR apply:

customdatetiemfield > '2019-01-14 06:23:09' and customdatetiemfield < '2019-01-14 08:23:09'

bug: local > UTC

server timezone: Europe/Amsterdam

filter:

customdatetiemfield > yesterday

query:

customdatetimefield > '2019-01-13 22:59:59'

expected after bugfix

customdatetimefield > '2019-01-13 23:59:59'

Steps to reproduce the bug:

  1. Check examples above
  2. If you're using mautibox or dev enviroment check your lgos and see sql query of segment.
  3. You should see dates and where statmenets as I describe above

Steps to test this PR:

  1. Load up this PR
  2. Test filters from example
  3. See If works for you.

kuzmany added some commits Jan 14, 2019

@kuzmany kuzmany added Ready To Test and removed WIP labels Jan 14, 2019

@kuzmany kuzmany added this to the 2.15.1 milestone Jan 14, 2019

@alanhartless alanhartless added this to Needs Testing in 2.15.1 Jan 14, 2019

@alanhartless

This comment has been minimized.

Copy link
Contributor

alanhartless commented Jan 30, 2019

@kuzmany can you resolve the conflict?

@alanhartless alanhartless moved this from Needs Testing to Has Conflicts and/or Failing Tests in 2.15.1 Jan 30, 2019

kuzmany added some commits Jan 30, 2019

@kuzmany kuzmany removed the Has Conflicts label Jan 30, 2019

@kuzmany kuzmany moved this from Has Conflicts and/or Failing Tests to Needs Testing in 2.15.1 Jan 30, 2019

@alanhartless alanhartless removed this from the 2.15.1 milestone Mar 11, 2019

@alanhartless alanhartless removed this from Needs Testing in 2.15.1 Mar 11, 2019

@alanhartless alanhartless added this to the 2.16.0 milestone Mar 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.