getIssueWorklog method
Returns worklogs for an issue, starting from the oldest worklog or from the worklog started on or after a date and time.
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: Workloads are only returned where the user has:
- 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.
- If the worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to.
Implementation
Future<PageOfWorklogs> getIssueWorklog(
{required String issueIdOrKey,
int? startAt,
int? maxResults,
int? startedAfter,
int? startedBefore,
String? expand}) async {
return PageOfWorklogs.fromJson(await _client.send(
'get',
'rest/api/3/issue/{issueIdOrKey}/worklog',
pathParameters: {
'issueIdOrKey': issueIdOrKey,
},
queryParameters: {
if (startAt != null) 'startAt': '$startAt',
if (maxResults != null) 'maxResults': '$maxResults',
if (startedAfter != null) 'startedAfter': '$startedAfter',
if (startedBefore != null) 'startedBefore': '$startedBefore',
if (expand != null) 'expand': expand,
},
));
}