Fixed creation of group by tag for XML report export.
[timetracker.git] / WEB-INF / lib / ttImportHelper.class.php
index dfa3be5..d966f89 100644 (file)
@@ -248,6 +248,7 @@ class ttImportHelper {
       $this->logMap[$this->currentElement['ID']] =
         ttTimeHelper::insert(array(
           'user_id' => $this->userMap[$this->currentElement['USER_ID']],
+          'group_id' => $this->group_id,
           'date' => $this->currentElement['DATE'],
           'start' => $this->currentElement['START'],
           'finish' => $this->currentElement['FINISH'],
@@ -292,6 +293,7 @@ class ttImportHelper {
       ttExpenseHelper::insert(array(
         'date' => $this->currentElement['DATE'],
         'user_id' => $this->userMap[$this->currentElement['USER_ID']],
+        'group_id' => $this->group_id,
         'client_id' => $this->clientMap[$this->currentElement['CLIENT_ID']],
         'project_id' => $this->projectMap[$this->currentElement['PROJECT_ID']],
         'name' => $this->currentElement['NAME'],
@@ -332,7 +334,10 @@ class ttImportHelper {
         'chfinish' => (int) $this->currentElement['SHOW_END'],
         'chnote' => (int) $this->currentElement['SHOW_NOTE'],
         'chcf_1' => (int) $this->currentElement['SHOW_CUSTOM_FIELD_1'],
-        'group_by' => $this->currentElement['GROUP_BY'],
+        'chunits' => (int) $this->currentElement['SHOW_WORK_UNITS'],
+        'group_by1' => $this->currentElement['GROUP_BY1'],
+        'group_by2' => $this->currentElement['GROUP_BY2'],
+        'group_by3' => $this->currentElement['GROUP_BY3'],
         'chtotalsonly' => (int) $this->currentElement['SHOW_TOTALS_ONLY']));
     }
     $this->currentTag = '';