-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
Conversation
jmcclelland
commented
Apr 28, 2017
•
edited by civicrm-builder
Loading
edited by civicrm-builder
- CRM-20499: When using custom fields for smart group criteria, relative dates create static dates instead
unit test perchance? |
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. |
I'm taking a look at this and working on reproducing the original bug, but glad to see the unit tests! |
Hmm so I'm still seeing the bug with this patch applied. |
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. However, if you do the same thing with Birth Date, it retains the value "this week". 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. |
@jmcclelland Any thoughts what to do with this PR? Keep open or close? |
Since this is stale I'll close & you can re-open once it's rebased |
Can we re-open this? This is still a bug |
@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. |
I've opened a fresh pull request here which I think addresses mepps problem: 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. |