Time Tracking

Track time spent by operators on tickets, creating a time sheet for each ticket and operator.

Contents

Activating, Deactivating and Uninstalling

To activate the plugin, visit Plugins and click on 'activate' under the Time Tracking plugin name. The plugin must not currently be activated.

Deactivating the plugin will stop it from functioning but keep your existing settings saved. To deactivate the plugin, visit Plugins and click on 'deactivate' under the Time Tracking plugin name. The plugin must already be activated beforehand.

Uninstalling the plugin will remove the settings from your system and also delete the plugin completely. We recommend to use the deactivate option instead, unless you have absolutely no need for this plugin. To uninstall the plugin, visit Plugins and click on 'uninstall' under the Time Tracking plugin name.


Settings

To configure the plugin, visit Plugins and click on 'Settings' under the Time Tracking plugin name. The plugin must already be activated beforehand.

The following settings are available for configuration:


The Timesheet

A time entry should be used to denote a single piece of work that has been carried out by an operator on a ticket for a known length of time, and multiple time entries together form a timesheet for that given ticket. Each ticket has its own timesheet, showing the total time logged for that ticket and how much of that is billable. To view the timesheet, load a ticket and click on the Timesheet tab. The status of time entries in the timesheet denote if those entries are still active and being controller by the timer (described later) or have been completed already.

Timesheet

Creating a Time Entry

To create a time entry:

  1. Load the ticket view for the ticket you wish to add the time entry to.
  2. Click on the Timesheet tab, and then 'Add a Time Entry'.
  3. A form will display, please fill in the date of the entry, the length of time, an optional description and if the time entry is billable or not, and then click Save.
  4. The timesheet will reload with your entry now showing and the total time logged on the ticket updated.

Add Time Entry

Updating a Time Entry

You will be able to edit your own time entries, and can also edit entries for other operators if you have an operator role that is defined in the Admin Roles option in the plugin settings. To update a time entry:

  1. Load the ticket view for the ticket you wish to update a time entry for.
  2. Click on the Timesheet tab, and let the table load.
  3. Find the row you wish to edit, and click on the pencil icon on the right of the row.
  4. Update the form that displays and click Save.
  5. The timesheet will reload with the updated time entry.

Edit Time Entry

Deleting a Time Entry

You will be able to delete your own time entries, and can also delete entries for other operators if you have an operator role that is defined in the Admin Roles option in the plugin settings. To delete a time entry:

  1. Load the ticket view for the ticket you wish to update a time entry for.
  2. Click on the Timesheet tab, and let the table load.
  3. Find the row you wish to delete, and click on the cross icon on the right of the row.
  4. Press 'Yes, I'm Sure' in the popup that shows.
  5. The timesheet will reload with the time entry no longer there and the total time logged on the ticket updated.

Using the Timer

To make tracking time easier, the plugin will load a timer in the ticket sidebar for all tickets.

To start the timer, click the play button. This will set up a new time entry that is counting the time from when it was started, the time entry can be updated as above. The play button will become disabled and coloured green when it's active.

Starting Timer

To pause the timer, click the pause button. This will pause the timer, but leave it available to start again if needed. The pause button will become disabled and coloured red when it's paused, and the play button will be become available again.

Pausing Timer

To stop the timer, click the stop button. This will mark the time entry as complete and will make the play button available again to start a new entry. The main time will reset, but the logged time below will remain as it is.

Stopping Timer


Reports

The plugin comes with two reports, as described below. These can be found by going to Reports and are placed in the sidebar under the Time Tracking section.


API

The time tracking plugin comes with its own API as documented below, which is available when the plugin is enabled. Read our REST API guide for more information on how to authenticate to and use the SupportPal API.

Time Log

GET /api/plugin/timetracking/timelog

Returns a list of time entries logged by operators, filterable by the parameters below.

Parameters
ticket_id int (optional)
Filter by ticket ID.
user_id int (optional)
Filter by operator ID that the time entry is associated with.
status int (optional)
Filter by status: 0 - paused, 1 - active, 2 - complete.
billable boolean (optional)
Filter by if the time entry is billable or not.
start_date int (optional)
Fetch time entries starting from this UNIX timestamp.
end_date int (optional)
Fetch time entries ending at this UNIX timestamp.
GET /api/plugin/timetracking/timelog/{id}

Returns a time entry specified by the ID, includes the ticket and related operator data.

POST /api/plugin/timetracking/timelog

Adds a new time entry for a given ticket and operator.

Parameters
ticket_id int
The ticket ID.
user_id int
The ID of the operator that is associated with the time entry.
time int
Length of the time entry.
start_time int
A UNIX timestamp of when the time entry started.
description string (optional)
Add a description to the time entry.
billable boolean (optional)
If the time entry is billable, will default to the selected option in the plugin settings.
PUT /api/plugin/timetracking/timelog/{id}

Update a time entry specified by the ID.

Parameters
user_id int (optional)
The ID of the operator that is associated with the time entry.
time int (optional)
Length of the time entry.
start_time int (optional)
A UNIX timestamp of when the time entry started.
description string (optional)
Add or update the description of the time entry.
billable boolean (optional)
If the time entry is billable.
DELETE /api/plugin/timetracking/timelog/{id}

Delete a time entry specified by the ID.

Timer

POST /api/plugin/timetracking/timer/{ticketId}/start

Starts the timer on the specified ticket.

Parameters
user_id int
The ID of the operator that is associated with the time entry.
POST /api/plugin/timetracking/timer/{ticketId}/pause

Pauses the timer on the specified ticket.

Parameters
user_id int
The ID of the operator that is associated with the time entry.
POST /api/plugin/timetracking/timer/{ticketId}/stop

Stops the timer on the specified ticket.

Parameters
user_id int
The ID of the operator that is associated with the time entry.

Total Time

GET /api/plugin/timetracking/timetotal/{ticketId}

Returns the total time logged and billtable time logged for the specified ticket, includes the ticket data.