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 two time tracking conditions available:

  • 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.

    Time tracking example

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    {
      "modules": {
        "jiraTimeTrackingProviders": [
          {
            "name": {
              "value": "My time tracking"
            },
            "key": "my-time-tracking"
          }
        ]
      }
    }
    

    Properties

    key
    Type
    Max length
    100
    Required
    Yes
    Pattern
    ^[a-zA-Z0-9-]+$
    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:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    {
        "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
    Type
    Required
    Yes
    Description

    A human readable name.

    Represents a string that can be resolved via a localization properties file. You can use the same i18n Property key and value in multiple places if you like, but identical keys must have identical values.

    Example

    1
    2
    3
    4
    {
      "value": "My text"
    }
    

    Properties

    value
    Type
    Max length
    1500
    Required
    Yes
    Description

    The human-readable default value. This will be used if no translation exists. Only the following HTML tags are supported: b, i, strong, em, and code.

    i18n
    Type
    Max length
    300
    Description

    The localization key for the human-readable value. Translations for the keys are defined at the top level of the add-on descriptor.


    adminPageKey
    Type
    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.


    Rate this page: