addWorklog method
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.
Implementation
Future<Worklog> addWorklog(
{required String issueIdOrKey,
bool? notifyUsers,
String? adjustEstimate,
String? newEstimate,
String? reduceBy,
String? expand,
bool? overrideEditableFlag,
required Worklog body}) async {
return Worklog.fromJson(await _client.send(
'post',
'rest/api/3/issue/{issueIdOrKey}/worklog',
pathParameters: {
'issueIdOrKey': issueIdOrKey,
},
queryParameters: {
if (notifyUsers != null) 'notifyUsers': '$notifyUsers',
if (adjustEstimate != null) 'adjustEstimate': adjustEstimate,
if (newEstimate != null) 'newEstimate': newEstimate,
if (reduceBy != null) 'reduceBy': reduceBy,
if (expand != null) 'expand': expand,
if (overrideEditableFlag != null)
'overrideEditableFlag': '$overrideEditableFlag',
},
body: body.toJson(),
));
}