Documentation

Time Tracking Provider

This module allows an add-on to replace JIRA's native time tracking features with features provided by the add-on. The purpose of this feature is to allow add-ons that provide time tracking functionality to "hide" JIRA's native features so that users do not see duplicate UI elements.

When this module is declared, the name of the module will be displayed as an option in JIRA's time tracking administration page. When the add-on is selected as the "Time tracking provider" for JIRA, most native JIRA time tracking user interface elements will be hidden. However, time tracking APIs will remain available.

Specifically, the following native JIRA features will be suppressed:

  • "Log work" button
  • Time tracking issue panel
  • Work logs issue tab panel
Add-ons can use standard modules like web items and web panels to implement custom versions of these features.

Conditions

Several time tracking related conditions are provided and intended to be used together with this module. They allow you to apply conditions to other modules that you declare, based on whether or not your add-on is selected as the current time tracking provider in JIRA.

There are three time tracking conditions available:

  • time_tracking_enabled evaluates to true if time tracking is turned on in JIRA with any provider
  • jira_tracking_provider_enabled condition is true if the currently selected time tracking provider is JIRA's native time tracking implementation
  • addon_time_tracking_provider_enabled condition is true if the currently selected time tracking provider matches the one defined in the condition parameters
Refer to the Conditions documentation for information on how to add these conditions to your modules.

Administration page

Your add-on may provide an administration page that will be shown to the user if they select your add-on as the time tracking provider. First declare an adminPages module, then reference it in the adminPageKey field of this module (see below). This page will be accessible from the System tab in the Administration page in JIRA.

Example

{
  "modules": {
    "jiraTimeTrackingProviders": [
      {
        "name": {
          "value": "My time tracking"
        },
        "key": "my-time-tracking"
      }
    ]
  }
}

Properties

key

Type
string
Required
Yes
Description

A key to identify this module.

This key must be unique relative to the add on, with the exception of Confluence macros: Their keys need to be globally unique.

Keys must only contain alphanumeric characters and dashes.

The key is used to generate the url to your add-on's module. The url is generated as a combination of your add-on key and module key. For example, an add-on which looks like:

{
    "key": "my-addon",
    "modules": {
        "configurePage": {
            "key": "configure-me",
        }
    }
}

Will have a configuration page module with a URL of /plugins/servlet/ac/my-addon/configure-me.

name

Required
Yes
Description

A human readable name.

adminPageKey

Type
string
Description

If provided, this needs to reference an existing adminPage module defined by the same add-on. JIRA will link the referenced adminPage module as the configuration page of this time tracking module.