JetTime Work Log Metadata

JetTime enhances standard Jira’s API work log object by using work log properties. All JetTime-related data is stored as a custom work log property with the key jettime. Below is a complete example of how JetTime stores its metadata:

Full Example of JetTime Work Log Metadata

{
  
  // Standard Jira work log fields 
  // ...
  
  "properties": [
    {
      "key": "jettime",
      "value": {
        "schemaVersion": 1,
        "author": {
          "accountId": "5c2922bd4b248c315badd7fb",
          "displayName": "Jame Jameson",
          "avatarUrl": "https://avatar-url-goes-here"
        },
        "timeSpentSeconds": {
          "BILLABLE": 1800,
          "BILLABLE_OVER": 1200
        },
        "fields": {
          "EXPENSE": 1800,
          "INTERNAL": false,
          "INTERNAL_NOTES": "Just between us, pssst...",
          "TAGS": ["Urgent", "2x Rate"],
          "MILEAGE": 208.56,
          "WORK_TYPE": "Construction"
        },
        "account": {
          "name": "Acme Corp",
          "key": "ACME"
        }
      }
    }
  ]
}

Breakdown of the Metadata

Let’s go step by step to understand each part of this data structure and what it represents:

1. Schema Version

JetTime uses a schema version field to ensure backward compatibility in case of future changes to the metadata structure. The current schema version is:

"schemaVersion": 1

2. Work Log Author

JetTime stores the actual author of the work log in the author field within its metadata.

In the current Forge version, Jira automatically sets the author of a work log to the account of the user who makes the request, and it does not allow overriding this field. To enable logging work on behalf of others, JetTime includes its own author field in the metadata.

You should always use this field and ignore the built-in Jira author field.

The stored author metadata includes:

  • Account ID: The unique Atlassian account ID for the user who created this work log.
  • Display Name: The name of the user (e.g., “Jame Jameson”).
  • Avatar URL: A link to the user’s avatar image.

Example:

"author": {
    "accountId": "5c2922bd4b248c315badd7fb",
    "displayName": "Jame Jameson",
    "avatarUrl": "https://avatar-url-goes-here"
}

3. Custom Time Categories

JetTime supports tracking multiple time categories, such as “Billable Time” and “Billable Overtime,” recorded in seconds under the timeSpentSeconds object.

Each category key is defined in the app UI when you create and configure that custom time category.

Example:

"timeSpentSeconds": {
    "BILLABLE": 1800,
    "BILLABLE_OVER": 1200
}

4. Custom Work Log Fields

Custom fields defined in JetTime are stored under the fields object. These fields are flexible to accommodate numeric values, strings, tags, or boolean data.

Each field key is defined in the app UI when you create and configure that custom work log field.

Below is a breakdown of the example:

"fields": {
    "EXPENSE": 1800,
    "INTERNAL": false,
    "INTERNAL_NOTES": "Just between us, pssst...",
    "TAGS": ["Urgent", "2x Rate"],
    "MILEAGE": 208.56,
    "WORK_TYPE": "Construction"
}

5. Account Information

JetTime allows associating work logs with specific accounts, clients, or projects. This information is stored in the account object:

"account": {
    "name": "Acme Corp",
    "key": "ACME"
}

Next Steps

For more details on retrieving or creating work logs via the API, refer to the articles on Retrieving Work Logs via API and Logging Work via API.