Add Worklog
POST {{baseUrl}}/rest/api/3/issue/:issueIdOrKey/worklog?notifyUsers=true&adjustEstimate=auto&newEstimate=<string>&reduceBy=<string>&expand=&overrideEditableFlag=false
Adds a worklog to an issue.
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:
- Browse projects and Work on issues project permission for the project that the issue is in.
- If issue-level security is configured, issue-level security permission to view the issue.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
notifyUsers | boolean | Whether users watching the issue are notified by email. | |
adjustEstimate | string | Defines how to update the issue's time estimate, the options are: |
new
Sets the estimate to a specific value, defined innewEstimate
.leave
Leaves the estimate unchanged.manual
Reduces the estimate by amount specified inreduceBy
.auto
Reduces the estimate by the value oftimeSpent
in the worklog. | |newEstimate
| string | | The value to set as the issue's remaining time estimate, as days (#d), hours (#h), or minutes (#m or #). For example, 2d. Required whenadjustEstimate
isnew
. | |reduceBy
| string | | The amount to reduce the issue's remaining estimate by, as days (#d), hours (#h), or minutes (#m). For example, 2d. Required whenadjustEstimate
ismanual
. | |expand
| null | | Use expand to include additional information about work logs in the response. This parameter acceptsproperties
, which returns worklog properties. | |overrideEditableFlag
| boolean | | Whether the worklog entry should be added to the issue even if the issue is not editable, because jira.issue.editable set to false or missing. For example, the issue is closed. Only connect app users with admin scope permission can use this flag. |
Request Body
{"visibility"=>{"type"=>"<string>", "value"=>"<string>"}, "started"=>"<dateTime>", "timeSpent"=>"<string>", "timeSpentSeconds"=>"<long>", "properties"=>[{"key"=>"<string>"}, {"key"=>"<string>"}]}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: Created
{"self":"http://gCY.fkfGmZL.bC5M","author":{"self":"laboris ut deserunt","name":"Excepteur dolore consectetur l","key":"voluptate sed","accountId":"ea ","emailAddress":"esse exercitation sint aute magna","avatarUrls":{"16x16":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"24x24":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"32x32":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"48x48":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"displayName":"dolor laboris sint","active":false,"timeZone":"ad","accountType":"irure voluptate veniam"},"updateAuthor":{"self":"labore dese","name":"sunt proident mollit","key":"Ut nulla commodo eu ani","accountId":"par","emailAddress":"elit","avatarUrls":{"16x16":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"24x24":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"32x32":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"48x48":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"displayName":"reprehenderit sit et nostrud","active":true,"timeZone":"id incididunt reprehenderit","accountType":"dolor"},"comment":{},"created":"2012-12-03T01:15:55.700Z","updated":"1960-11-06T14:29:52.666Z","visibility":{"type":"\u003cstring\u003e","value":"\u003cstring\u003e"},"started":"\u003cdateTime\u003e","timeSpent":"\u003cstring\u003e","timeSpentSeconds":"\u003clong\u003e","id":"commodo proident aliqua in","issueId":"qui consequat dolor sunt laboris","properties":[{"key":"\u003cstring\u003e","value":{}},{"key":"\u003cstring\u003e","value":{}}]}