Time Tracking
Track time spent by operators on tickets, creating a timesheet for each ticket.
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:
- Billable By Default - Whether time entries should be billable by default. Entries can be marked as billable or not, to separate work that must be charged against time spent by operators that is not chargeable.
- Admin Roles - Select the operator roles that should have permission to edit and delete time entries made by other operators. Operators with a role that is not selected will only be able to edit and delete their own entries.
Context Panel
When the plugin is active, a context panel is shown while viewing tickets in the operator panel. It has two parts: the timer, which lets operators start, pause, and stop a manual timer, and the timesheet, which lists all time entries for the ticket and provides options to add and manage entries.
Using the Timer
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 play button will become disabled and coloured green when it's active.
To pause the timer, click the pause button. This pauses the timer but keeps it available to start again if needed. The pause button will become disabled and coloured orange when it's paused, and the play button will become available again.
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.
The Timesheet
A time entry represents a single piece of work carried out by an operator on a ticket for a known length of time. Multiple time entries together form that ticket's timesheet. Each ticket has its own timesheet, showing the total time logged and how much of that time is billable. The timesheet is shown in the Time Tracking context panel, and entries are displayed as cards. The status of each card indicates whether the entry is still active and controlled by the timer (as described above), or has already been completed.
Creating a Time Entry
To create a time entry:
- Load the ticket view for the ticket you wish to add the time entry to.
- In the context panel, find the Timesheet section and click 'Add Time Entry'.
- 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.
- The timesheet will reload with your new entry shown, and the total time logged on the ticket updated.
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:
- Load the ticket view for the ticket you wish to update a time entry on.
- In the context panel, find the entry card you wish to edit.
- Click the Edit button on that card.
- Update the form that displays and click Save.
- The timesheet will reload with the updated 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:
- Load the ticket view for the ticket you wish to delete a time entry from.
- In the context panel, find the entry card you wish to delete.
- Click the Delete button on that card.
- Press 'Yes, I'm Sure' in the popup that shows.
- The timesheet will reload with the time entry no longer there and the total time logged on the ticket updated.
Reports
The plugin comes with two reports, as described below. These can be found by going to Reports and are placed in the navigation sidebar under the Time Tracking section.
- Timesheet - Similar to the timesheet for a single ticket, but for all tickets over a period of time.
- Total Logged Time - Shows the total time logged by a given operator over a period of time.
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.
| 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.
| ticket_id |
intThe ticket ID. |
|---|---|
| user_id |
intThe ID of the operator that is associated with the time entry. |
| time |
intLength of the time entry. |
| start_time |
intA 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.
| 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.
| user_id |
intThe 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.
| user_id |
intThe 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.
| user_id |
intThe 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 billable time logged for the specified ticket, including ticket data.