Skip to content

Function: getWorklog() ​

ts
function getWorklog(
   client, 
   parameters, 
   options?
): Promise<{
[key: string]: unknown;
  author?: {
   [key: string]: unknown;
     accountId?: string;
     accountType?: string;
     active?: boolean;
     avatarUrls?: {
      [key: string]: unknown;
        16x16?: string;
        24x24?: string;
        32x32?: string;
        48x48?: string;
     };
     displayName?: string;
     emailAddress?: string;
     self?: string;
     timeZone?: string;
  };
  comment?: {
   [key: string]: unknown;
     content: Record<string, any>[];
     type: string & object | "doc";
     version: number;
  };
  created?: Date;
  id?: string;
  issueId?: string;
  properties?: object[];
  self?: string;
  started?: Date;
  timeSpent?: string;
  timeSpentSeconds?: number;
  updateAuthor?: {
   [key: string]: unknown;
     accountId?: string;
     accountType?: string;
     active?: boolean;
     avatarUrls?: {
      [key: string]: unknown;
        16x16?: string;
        24x24?: string;
        32x32?: string;
        48x48?: string;
     };
     displayName?: string;
     emailAddress?: string;
     self?: string;
     timeZone?: string;
  };
  updated?: Date;
  visibility?: {
   [key: string]: unknown;
     identifier?: string | null;
     type?: "role" | "group" | string & object;
     value?: string;
  };
}>;

Defined in: src/cloud/api/issueWorklogs.ts:145

Returns 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.
  • If the worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to.

Parameters ​

ParameterTypeDescription
clientClient-
parameters{ expand?: | "properties" | string & object | ("properties" | string & object)[]; id: string; issueIdOrKey: string; }-
parameters.expand?| "properties" | string & object | ("properties" | string & object)[]Use expand to include additional information about work logs in the response. This parameter accepts properties, which returns worklog properties.
parameters.id?stringThe ID of the worklog.
parameters.issueIdOrKey?stringThe ID or key of the issue.
options?RequestOptions-

Returns ​

Promise<{ [key: string]: unknown; author?: { [key: string]: unknown; accountId?: string; accountType?: string; active?: boolean; avatarUrls?: { [key: string]: unknown; 16x16?: string; 24x24?: string; 32x32?: string; 48x48?: string; }; displayName?: string; emailAddress?: string; self?: string; timeZone?: string; }; comment?: { [key: string]: unknown; content: Record<string, any>[]; type: string & object | "doc"; version: number; }; created?: Date; id?: string; issueId?: string; properties?: object[]; self?: string; started?: Date; timeSpent?: string; timeSpentSeconds?: number; updateAuthor?: { [key: string]: unknown; accountId?: string; accountType?: string; active?: boolean; avatarUrls?: { [key: string]: unknown; 16x16?: string; 24x24?: string; 32x32?: string; 48x48?: string; }; displayName?: string; emailAddress?: string; self?: string; timeZone?: string; }; updated?: Date; visibility?: { [key: string]: unknown; identifier?: string | null; type?: "role" | "group" | string & object; value?: string; }; }>