-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[DPMMA-2187] Segment date filter and "equals" operator #13620
base: 5.x
Are you sure you want to change the base?
Conversation
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.
Why YYYY-MM-DD should not work with equal expression? Do I miss something?
@kuzmany I noticed that using these operators with incomplete dates does not return correct results when rebuilding segments. The date would have to be accurate to the second. I assume that for such a specific time we can simply add selected contacts manually. If we need to specify an exact day or time, using another operator is a better idea. |
@kuzmany let's assume that I would like to create a segment with contacts that were identified on a specific day, e.g. 2023-05-06, I set this filtering value in segment settings: When performing a segment rebuild (php bin/console m:s:u), a database query is generated with the following 'where' condition, which does not return matched contacts due to lack of exact time of the day I tested #11835, but for specific, non-relative dates such as 2023-05-06 the problem with equal/not equal still occurred. |
Description:
This PR extends the validation of data fields using the equals/not equal operators. Using these operators for dates causes the segment to not rebuild properly. This is due to the fact that date-related data is stored in the form of datetime and comparing it with only the date or incomplete datetime in the query does not return the expected results. The value to be compared must be accurate to the second, comparison with only the day in the YYYY-MM-DD format or with the day and partial time does not return all relevant contacts. This PR does not remove operators for data fields so that segments that have already been saved with them can be opened for editing.
Steps to test this PR: