Fixed emailing reports grouped by custom field, hopefully.
authorNik Okuntseff <support@anuko.com>
Thu, 1 Nov 2018 20:48:16 +0000 (20:48 +0000)
committerNik Okuntseff <support@anuko.com>
Thu, 1 Nov 2018 20:48:16 +0000 (20:48 +0000)
WEB-INF/lib/ttReportHelper.class.php
WEB-INF/templates/footer.tpl

index 5dafe95..3a6a096 100644 (file)
@@ -1445,7 +1445,10 @@ class ttReportHelper {
 
   // makeJoinPart builds a left join part for getSubtotals query (for time items).
   static function makeJoinPart($options) {
-    global $custom_fields; // TODO: is it safe to assume the object is there when needed?
+    global $user;
+    if (ttReportHelper::groupingBy('cf_1', $options)) {
+      $custom_fields = new CustomFields($user->group_id);
+    }
 
     $group_by_fields = ttReportHelper::makeGroupByFieldsPart($options); // TODO: refactor this, perhaps?
     if (strpos($group_by_fields, 'user') !== false) {
index 0b19691..ffb9e9c 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.18.05.4344 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.18.05.4345 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>