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

CRM-20499 - ensure date ranges work with custom fields. #10279

Closed
wants to merge 4 commits into from

Conversation

jmcclelland
Copy link
Contributor

@jmcclelland jmcclelland commented Apr 28, 2017

@eileenmcnaughton
Copy link
Contributor

unit test perchance?

@jmcclelland
Copy link
Contributor Author

It seems like it would be better if I could replicate an advanced search higher in the code but ... this test I think is adequate. Open to suggestions.

@mepps
Copy link
Contributor

mepps commented Sep 28, 2017

I'm taking a look at this and working on reproducing the original bug, but glad to see the unit tests!

@mepps
Copy link
Contributor

mepps commented Sep 28, 2017

Hmm so I'm still seeing the bug with this patch applied.

@mepps
Copy link
Contributor

mepps commented Sep 28, 2017

Steps to reproduce bug:

Using a custom field of type date, create an advanced search searching for all contacts with values in the range "this week". When you go to edit the search criteria, the range will have changed to the dates of the last week.

screenshot from 2017-09-28 15-21-30

However, if you do the same thing with Birth Date, it retains the value "this week".

screenshot from 2017-09-28 15-22-52

The database also reflects these values, with the metadata for the Birth Date search indicating it was a relative search for this week while the metadata for the custom field search only has the date range.

I found this behavior persists whether this patch is applied or not.

@mlutfy
Copy link
Member

mlutfy commented Mar 9, 2018

@jmcclelland Any thoughts what to do with this PR? Keep open or close?

@eileenmcnaughton
Copy link
Contributor

Since this is stale I'll close & you can re-open once it's rebased

@sleewok
Copy link
Contributor

sleewok commented Sep 10, 2018

Can we re-open this? This is still a bug

@mlutfy
Copy link
Member

mlutfy commented Sep 10, 2018

@sleewok Can you test the patch?

PRs are closed unless they are ready for review. In this case, if the PR is still stalled, it might be better to create a new issue in gitlab (https://lab.civicrm.org/dev/core), where we now track issues.

@jmcclelland
Copy link
Contributor Author

I've opened a fresh pull request here which I think addresses mepps problem:

#12824

In my experience - the advanced search criteria always displays the relative date properly after a search. But, before this patch, it will display the date range if you open the criteria after saving a smart group.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants