updateWorklog method
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:
- Browse projects project permission for the project that the issue is in.
- If issue-level security is configured, issue-level security permission to view the issue.
- Edit all worklogs project permission to update any worklog or Edit own worklogs to update worklogs created by the user.
- If the worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to.
Implementation
Future<Worklog> updateWorklog(
{required String issueIdOrKey,
required String id,
bool? notifyUsers,
String? adjustEstimate,
String? newEstimate,
String? expand,
bool? overrideEditableFlag,
required Worklog body}) async {
return Worklog.fromJson(await _client.send(
'put',
'rest/api/3/issue/{issueIdOrKey}/worklog/{id}',
pathParameters: {
'issueIdOrKey': issueIdOrKey,
'id': id,
},
queryParameters: {
if (notifyUsers != null) 'notifyUsers': '$notifyUsers',
if (adjustEstimate != null) 'adjustEstimate': adjustEstimate,
if (newEstimate != null) 'newEstimate': newEstimate,
if (expand != null) 'expand': expand,
if (overrideEditableFlag != null)
'overrideEditableFlag': '$overrideEditableFlag',
},
body: body.toJson(),
));
}