AnsweredAssumed Answered

custom where for custom dashlet not working 6.5

Question asked by Rodolfo Tuble on Jul 7, 2016
Latest reply on Jul 7, 2016 by Tevfik Tümer

I am following this guide, I followed every step but my problem is that this part of the code is not working as expected:

 

MyTasksUntilNowDashlet.php

function process($lvsParams = array()) {

  global $timedate, $current_user;

  $format = $timedate->get_date_time_format($current_user);

  $dbformat = date('Y-m-d H:i:s', strtotime(date($format)));

   $lvsParams['custom_where'] = 'AND DATE_FORMAT(tasks.date_start, "%Y-%m-%d %H:%i:%s") <= "'.$dbformat.'"';

  parent::process($lvsParams);

  }

 

If I do a direct query in my workbench there is a result, but if run trough this function it returns nothing. Is there something wrong with how this was implemented?

Outcomes