Managing Work Logs for Others via the API
JetTime provides a way to manage work logs on behalf of others using its own metadata field for author information. This approach overcomes a limitation in Jira’s current Forge app environment.
Why JetTime Uses its Own Author Field
In the current Forge version, Jira automatically sets the author of a work log as the current user making the API request. This behavior prevents logging work on behalf of others. To address this limitation, JetTime introduces its own author
field in the jettime
metadata of a work log. This field securely stores the actual author of the log, ensuring accurate records and enabling reporting on behalf of other users.
You should always use JetTime author
field and ignore the built-in Jira author
field.
The JetTime author
field includes the following details:
- Account ID: The unique Atlassian account ID of the user for whom the work was logged.
- Display Name: A user-friendly name for the author (e.g., “Jame Jameson”).
- Avatar URL: An image URL for the user’s avatar, displayed in reports and UI where applicable.
Example Metadata with Author Field
{ // 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" } } } ] }
Next Steps
For more information, see Logging Work via the API, Retrieving Work Logs via the API, and JetTime Work Log Metadata.