From: Nik Okuntseff Date: Sat, 2 Mar 2019 14:46:01 +0000 (+0000) Subject: A few fixes related to tt_timesheets fields renaming. X-Git-Tag: timetracker_1.19-1~241 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=f8112c585d6ba4dac203e9082b2229fd027f985c;p=timetracker.git A few fixes related to tt_timesheets fields renaming. --- diff --git a/WEB-INF/lib/ttGroupExportHelper.class.php b/WEB-INF/lib/ttGroupExportHelper.class.php index 06a3697d..ac35cd87 100644 --- a/WEB-INF/lib/ttGroupExportHelper.class.php +++ b/WEB-INF/lib/ttGroupExportHelper.class.php @@ -331,11 +331,12 @@ class ttGroupExportHelper { $timesheet_part = $this->indentation.' '."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 .= ">\n"; fwrite($this->file, $timesheet_part); diff --git a/WEB-INF/lib/ttOrgImportHelper.class.php b/WEB-INF/lib/ttOrgImportHelper.class.php index 43056bdf..edd59b6b 100644 --- a/WEB-INF/lib/ttOrgImportHelper.class.php +++ b/WEB-INF/lib/ttOrgImportHelper.class.php @@ -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. diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index bd0a554d..02b5b048 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.18.50.4804 | Copyright © Anuko | +  Anuko Time Tracker 1.18.50.4805 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/timesheet_view.php b/timesheet_view.php index bde974e6..57eff61c 100644 --- a/timesheet_view.php +++ b/timesheet_view.php @@ -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');