A few fixes related to tt_timesheets fields renaming.
authorNik Okuntseff <support@anuko.com>
Sat, 2 Mar 2019 14:46:01 +0000 (14:46 +0000)
committerNik Okuntseff <support@anuko.com>
Sat, 2 Mar 2019 14:46:01 +0000 (14:46 +0000)
WEB-INF/lib/ttGroupExportHelper.class.php
WEB-INF/lib/ttOrgImportHelper.class.php
WEB-INF/templates/footer.tpl
timesheet_view.php

index 06a3697..ac35cd8 100644 (file)
@@ -331,11 +331,12 @@ class ttGroupExportHelper {
         $timesheet_part = $this->indentation.'    '."<timesheet id=\"".$this->timesheetMap[$timesheet_item['id']]."\"";
         $timesheet_part .= " user_id=\"".$this->userMap[$timesheet_item['user_id']]."\"";
         $timesheet_part .= " client_id=\"".$this->clientMap[$timesheet_item['client_id']]."\"";
+        $timesheet_part .= " project_id=\"".$this->projectMap[$timesheet_item['project_id']]."\"";
         $timesheet_part .= " name=\"".htmlspecialchars($timesheet_item['name'])."\"";
         $timesheet_part .= " submit_status=\"".$timesheet_item['submit_status']."\"";
-        $timesheet_part .= " submitter_comment=\"".htmlspecialchars($timesheet_item['submitter_name'])."\"";
-        $timesheet_part .= " approval_status=\"".$timesheet_item['approval_status']."\"";
-        $timesheet_part .= " manager_comment=\"".htmlspecialchars($timesheet_item['manager_comment'])."\"";
+        $timesheet_part .= " comment=\"".htmlspecialchars($timesheet_item['comment'])."\"";
+        $timesheet_part .= " approve_status=\"".$timesheet_item['approve_status']."\"";
+        $timesheet_part .= " approve_comment=\"".htmlspecialchars($timesheet_item['approve_comment'])."\"";
         $timesheet_part .= " status=\"".$timesheet_item['status']."\"";
         $timesheet_part .= "></timesheet>\n";
         fwrite($this->file, $timesheet_part);
index 43056bd..edd59b6 100644 (file)
@@ -283,11 +283,15 @@ class ttOrgImportHelper {
           'group_id' => $this->current_group_id,
           'org_id' => $this->org_id,
           'client_id' => $this->currentGroupClientMap[$attrs['CLIENT_ID']],
+          'project_id' => $this->currentGroupProjectMap[$attrs['PROJECT_ID']],
           'name' => $attrs['NAME'],
+          'comment' => $attrs['COMMENT'],
+  // TODO: add handling of these.
+  //`start_date` date NOT NULL,                      # timesheet start date
+  //`end_date` date NOT NULL,                        # timesheet end date
           'submit_status' => $attrs['SUBMIT_STATUS'],
-          'submitter_comment' => $attrs['SUBMITTER_COMMENT'],
-          'approval_status' => $attrs['APPROVAL_STATUS'],
-          'manager_comment' => $attrs['MANAGER_COMMENT'],
+          'approve_status' => $attrs['APPROVE_STATUS'],
+          'approve_comment' => $attrs['APPROVE_COMMENT'],
           'status' => $attrs['STATUS']));
         if ($timesheet_id) {
           // Add a mapping.
index bd0a554..02b5b04 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.50.4804 | 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.50.4805 | 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>
index bde974e..57eff61 100644 (file)
@@ -63,7 +63,7 @@ if ($showSubmit) {
   $showApprovers = count($approvers) >= 1;
 }
 $canApprove = $user->can('approve_timesheets') || $user->can('approve_own_timesheets');
-$showApprove = $timesheet['submit_status'] && $timesheet['approval_status'] == null;
+$showApprove = $timesheet['submit_status'] && $timesheet['approve_status'] == null;
 
 // Add a form with controls.
 $form = new Form('timesheetForm');