CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions (Moderator: Dave Greenberg) »
  • Saved Search by relative date ranges
Pages: [1]

Author Topic: Saved Search by relative date ranges  (Read 1053 times)

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Saved Search by relative date ranges
September 11, 2012, 10:08:00 pm
It seems that the relative date criteria convert 'Last Quarter' to a date range.

That's ok, but it would be really nice to create a Saved Search that interprets 'Last Quarter' when the query is run. Eg, a Smart Group called 'Recent Donors' which stays up-to-date.
  • Rather than having the front-end convert 'Last Quarter' to dates, leave it as 'Last Quarter'
  • Have the DAO convert 'Last Quarter' to dates as it generates the query
  • Each time the query is run it uses dates relative to the run-date

Ken

Deepak Srivastava

  • Ask me questions
  • ****
  • Posts: 677
  • Karma: 65
Re: Saved Search by relative date ranges
September 13, 2012, 02:12:21 am
Looked at the code and did some investigation on this.

It does convert relative dates for example 'Last Quarter' as a date range based on NOW() when the query is run.
However initial interpretation of dates (at the time of creating smart search) is also recorded and stored, but not used when the query is run.

Search result also displays the converted dates when showing the results at the time of creating smart search, which may give a feeling that its not relative and just a conversion.
If that's not the case try clearing caches & check.
« Last Edit: September 13, 2012, 06:50:02 am by Deepak Srivastava »
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: Saved Search by relative date ranges
September 13, 2012, 11:20:35 pm
My apologies, Deepak!

I saw the original dates being stored and thought they were used when the query was rerun. I should test first and post later. I hope you didn't waste too much time on that.

Thanks for your help,

Ken

PS: Saved Searches with relative dates is a really powerful feature. This is cool!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions (Moderator: Dave Greenberg) »
  • Saved Search by relative date ranges

This forum was archived on 2017-11-26.