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

MAUT-11383 : incorrect date value being calculating when the segment filter value is "yesterday" and operator is "gt" for date field #359

Merged
merged 2 commits into from
Oct 10, 2024

Conversation

dadarya0
Copy link
Contributor

@dadarya0 dadarya0 commented Oct 4, 2024

Q A
Bug fix? (use the a.b branch) Yes
New feature/enhancement? (use the a.x branch) No
Deprecations? [ ]
BC breaks? (use the c.x branch) [ ]
Automated tests included? Yes
Related user documentation PR URL mautic/mautic-documentation#...
Related developer documentation PR URL mautic/developer-documentation#...
Issue(s) addressed Fixes https://acquia.atlassian.net/browse/MAUT-11383

Description:

For custom object date and date time for yesterday it is taking -2 day date and for tomorrow it is taking +2 day date.
For eg: today is 26:

for after inc day yesterday it shows: >= '2024-09-24'

for before inc day tomorrow it shows: <= '2024-09-28 23:59:59'

adding one day xtra in value

Steps to test this PR:

  1. Open this PR for testing locally (see docs on testing PRs here)
  2. Create a custom object with datetime field
  3. Create segment filter with after including day or before including day with value yesterday or tomorrow
  4. Filter should work correctly

@dadarya0 dadarya0 requested review from a team, fedys and avikarshasaha and removed request for a team October 4, 2024 09:21
Copy link
Contributor

@fedys fedys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dadarya0!

Copy link
Contributor

@avikarshasaha avikarshasaha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dadarya0. Tested in beta, working as described!

@dadarya0 dadarya0 merged commit 467455c into staging Oct 10, 2024
3 checks passed
@dadarya0 dadarya0 deleted the MAUT-11383 branch October 10, 2024 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants