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-11289 : Segments: New (not)between date filter #347

Merged
merged 12 commits into from
Jun 14, 2024
Merged

Conversation

dadarya0
Copy link
Contributor

@dadarya0 dadarya0 commented May 28, 2024

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

Description:

This PR adds new between and not between operators for the date fields and allows users to set 2 absolute dates like this:

image

The validation is also in place. This is how it looks like when one of the date ranges is empty:
image

Steps to test this PR:

  1. Open this PR for testing locally (see docs on testing PRs here)
  2. Check that the new not/between operators are there for the date fields but not for other field types where it doesn't make sense.
  3. There is the new dual-input for for the filter value only when a not/between operator for the date field is selected.
  4. Test that the contacts are added to the segment based on a custom object date field
  5. Test the filter field validation. Each of the 2 new inputs must be a date in the format as the calendar sets it. Example: Jan 5, 2024. Empty values and other values should be rejected.
  6. Test both filters, the between but also the not between.

avikarshasaha
avikarshasaha previously approved these changes May 29, 2024
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.

Looks good to me! Thanks @dadarya0

# Conflicts:
#	Helper/QueryFilterHelper.php
avikarshasaha
avikarshasaha previously approved these changes May 31, 2024
@aarohiprasad aarohiprasad self-requested a review June 5, 2024 07:54
aarohiprasad
aarohiprasad previously approved these changes Jun 5, 2024
Copy link
Contributor

@aarohiprasad aarohiprasad left a comment

Choose a reason for hiding this comment

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

Tested on beta, working as expected. Thanks @dadarya0

@dadarya0
Copy link
Contributor Author

dadarya0 commented Jun 5, 2024

@aarohiprasad @avikarshasaha conflict resolve please review PR.

avikarshasaha
avikarshasaha previously approved these changes Jun 5, 2024
aarohiprasad
aarohiprasad previously approved these changes Jun 6, 2024
Copy link
Contributor

@aarohiprasad aarohiprasad 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

@dadarya0
Copy link
Contributor Author

@aarohiprasad @avikarshasaha please reapprove again, I have resolved conflict only.

avikarshasaha
avikarshasaha previously approved these changes Jun 12, 2024
Copy link
Contributor

@aarohiprasad aarohiprasad 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

@escopecz escopecz merged commit 7e8f339 into staging Jun 14, 2024
3 checks passed
@escopecz escopecz deleted the MAUT-11289 branch June 14, 2024 07:41
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.

5 participants