6

I was trying to help a group make a simple smart group of all memberships set to expire within the next 2 months and the dropdown for "End date" in the Membership section of Advanced Search only had "prior", "past", and "previous" options. Then, before posting here, I realized they were running on 4.5.x so I tested on 4.6.6 and saw that there were some noted improvements to this list (including some future dates):

End date

We may be able to get by with these new options (thank you, whomever made them!) but I was curious if there was an easy way to hook into that date widget somehow in a module or extension and define a new option (e.g. "Upcoming 60 days"), or if that is a much bigger issue and best not to mess with. Does anyone know?

3

I'm not sure where to start as I can't answer the main question apart from quoting a colleague Jon Goldberg 29/Mar/15 5:19 AM

for now, you can use the PHP overrides folder to maintain your own local copy of this file when 4.6 comes out. I do this frequently for issues like this where I expect the problem to go away in the next version. I may do a diff if there's a security release of 4.6 that comes out that might change that file, but otherwise I leave things be.

This may or may not appropriate for your circumstances.

Personally, I would be reluctant to use "Upcoming Month" for anything as it gives inconsistent results because of the different numbers of days in the calendar months. So "Upcoming month" run on any day in February is effectively "Upcoming 28 days" (or "29" if it is a leap year), but will be "Upcoming 30 days" or "Upcoming 31 days" if run in other calendar months.

There is an issue CRM-16954 and associated PR which will, amongst other things, change "Upcoming month" to "Next 30 days" for 4.7. I will canvas the idea of including "Next 60 days" in that PR, although there is a reluctance to add yet more relative date filters to an already very long list.

Finally to outline what will be possible in the near future. The aims of CRM-16195 is to allow people to define their own relative date filters through the UI. We had hoped to have this ready for 4.7, but it is being pushed out to 4.8. Quite a bit of work has already gone into this courtesy of Jon Goldberg.

  • Is it still scheduled to 4.8? – Aivars Aug 16 '16 at 19:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.