]> wagnertech.de Git - timetracker.git/blobdiff - WEB-INF/lib/ttTimesheetHelper.class.php
Improvements to timesheet assignment algorithm.
[timetracker.git] / WEB-INF / lib / ttTimesheetHelper.class.php
index a348cb57b50a7bd14aeba7ed2d1abbb9bbf181e7..c2841c88d35644226c146ce666d5e92adc732c0d 100644 (file)
@@ -440,9 +440,8 @@ class ttTimesheetHelper {
     if ($options['show_cost'] && $user->isPluginEnabled('ex')) return false;
     
     // Parts for client and project.
-    if ($options['client_id']) $client_part = ' and client_id = '.(int)$options['client_id'];
-    if ($options['project_id']) $project_part = ' and project_id = '.(int)$options['project_id'];
-    // TODO: test and fix the above for NULL client and project ids...
+    if ($options['client_id']) $client_part = ' and (client_id is null or client_id = '.(int)$options['client_id'].')';
+    if ($options['project_id']) $project_part = ' and (project_id is null or project_id = '.(int)$options['project_id'].')';
 
     // Determine start and end dates.
     $dateFormat = $user->getDateFormat();