-
-
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
Add freeform relative date for 'This Fiscal Year' #13440
Add freeform relative date for 'This Fiscal Year' #13440
Conversation
(Standard links)
|
41b262d
to
9b6b54d
Compare
@magnolia61 there is an IF clause here being opened but not closed - hence all the errors. On the philosophy of this - I'm not sure what 'this_2.fiscal_year means. I can see that 'ending' is the last thing we expanded the definition of & we got 'last 90 days including today' and I'm assuming that you think that doesn't make sense because 'today' isn't a complete fiscal year. But I'm not 100% sure if this.2_fiscal_year is 'last 2 fiscal years ending at the end of this fiscal year' or '2 fiscal years before this one. If you mean the later then previous_2_fiscal makes sense. If you mean 'last 2 fiscal years including this one' I'm torn between thinking maybe 'ending' is appropriate if we understand ending not as 'ending today' but 'ending at the end of this fiscal year' & thinking we want a new term. At this stage expanding 'this' seems kinda confusing to me this.day Today |
Our fiscal year, also our season is both used for the contributions as well as the registrations. Our Fiscal Year is from October 1st until September 30th. We use a Certificate of Good Conduct that people have to renew every 3 years/seasons (we only have summer camps). So our use case is a smart group of all Conduct that are still valid. For this year it would need to be from October 1st 2016 until September 30th 2019). I must admit that wanting the end date of the smart group be the end of the fiscal year instead of 'today' has to do with problems with smart groups that stalled to become static using hard coded dates instead of relative ones the last couple of years. Would the logic behind ending_2.fiscal-year lead to the range starting October 1st? My thinking would be it would fit best with 'This' as is has the current week, month, year with the days past and also the days to come. And add the previous. But it would not apply to this and the next two for instance. Maybe this_before_2.Fiscal Year and this_next_2.months which would be in line with some existing ones? |
The before_x.fiscal_year that @luciano_s proposed in the dev channel would actually be partly a solution for our use case. It would be able to find dates older than within the current and previously two fiscal years. Our current workaround will be a smartgroup that consist of a combination of 'Prevous 2 Fiscal years' and 'This Fiscal Year'. |
9b6b54d
to
108c27b
Compare
@civicrm-builder retest this please |
a8cc4bd
to
89aa667
Compare
89aa667
to
ae94053
Compare
I put up an amended version of this - with the tests #14894 |
Overview
Addred freeform relative date filter fot 'This Fiscal Year'
Before
Only hardcoded relative date filter was possible for This Fiscal Year
After
Also This and last 1,2,3,x fiscal years is possible
this_1.fiscal_year, this_2.fiscal_year, this_x.fiscal_year
Technical Details
Based on other work being done in #12682
Comments
Works like a charm