PUT /rest/api/2/issue/{issueIdOrKey}/worklog/{id}

Updates a worklog.

Time tracking must be enabled in Jira, otherwise this operation returns an error. For more information, see Configuring time tracking.

This operation can be accessed anonymously.

Permissions required:

Servers

Path parameters

Name Type Required Description
id String Yes

The ID of the worklog.

issueIdOrKey String Yes

The ID or key the issue.

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Query parameters

Name Type Required Description
notifyUsers Boolean No

Whether users watching the issue are notified by email.

Default value: true

newEstimate String No

The value to set as the issue's remaining time estimate, as days (#d), hours (#h), or minutes (#m or #). For example, 2d. Required when adjustEstimate is new.

expand String No

Use expand to include additional information about worklogs in the response. This parameter accepts properties, which returns worklog properties.

overrideEditableFlag Boolean No

Whether the worklog should be added to the issue even if the issue is not editable. For example, because the issue is closed. Connect and Forge app users with Administer Jira global permission can use this flag.

Default value: false

adjustEstimate String No

Defines how to update the issue's time estimate, the options are:

  • new Sets the estimate to a specific value, defined in newEstimate.
  • leave Leaves the estimate unchanged.
  • auto Updates the estimate by the difference between the original and updated value of timeSpent or timeSpentSeconds.

Possible values:

  • "manual"
  • "leave"
  • "auto"
  • "new"

Default value: "auto"

Request body fields

Name Type Required Description
id String No

The ID of the worklog record.

comment String No

A comment about the worklog. Optional when creating or updating a worklog.

timeSpent String No

The time spent working on the issue as days (#d), hours (#h), or minutes (#m or #). Required when creating a worklog if timeSpentSeconds isn't provided. Optional when updating a worklog. Cannot be provided if timeSpentSecond is provided.

created String No

The datetime on which the worklog was created.

self String No

The URL of the worklog item.

properties[] Array No

Details of properties for the worklog. Optional when creating or updating a worklog.

properties[].key String No

The key of the property. Required on create and update.

properties[].value No

The value of the property. Required on create and update.

updated String No

The datetime on which the worklog was last updated.

started String No

The datetime on which the worklog effort was started. Required when creating a worklog. Optional when updating a worklog.

timeSpentSeconds Integer No

The time in seconds spent working on the issue. Required when creating a worklog if timeSpent isn't provided. Optional when updating a worklog. Cannot be provided if timeSpent is provided.

issueId String No

The ID of the issue this worklog is for.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.