Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Blocker
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.7.1
-
Fix Version/s: 4.7.13
-
Component/s: None
-
Labels:
-
Versioning Impact:Patch (backwards-compatible bug fixes)
-
Documentation Required?:None
-
Funding Source:Core Team Funds
Description
Right now in civicrm 4.7.x we are not storing the relative date value (e.g. 'this.year') but the absolute date range (from/to) values instead. As result it contradicts with smart group criteria for future purpose.
Lemme explain the scenario with an example. Suppose you have created a smart group criteria where 'contribution.recieve_date = this.year' then currently we are storing the date range value as array(from => '01-01-2016', to => '31-12-2016'). As a result of which in near future say next year 2017 when we want to get the contributors in current year 2017 will always get the contributors of past year as per the store date range criteria of smart group, which is incorrect.
For further details https://issues.civicrm.org/jira/browse/CRM-19250?focusedCommentId=94319&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-94319
So we need to :
1. Store relative date value in smart group's criteria NOT absolute date range.
2. Handle the logic to retrieve the relative value and set as default value against desired entity date field on Smart Group criteria edit screen.