jira.js
    Preparing search index...

    Function updateWorklog

    • Updates an existing worklog entry. Note that:

      • Fields possible for editing are: comment, visibility, started, timeSpent and timeSpentSeconds.
      • Either timeSpent or timeSpentSeconds can be set.
      • Fields which are not set will not be updated.
      • For a request to be valid, it has to have at least one field change.

      Parameters

      • client: Client
      • parameters: {
            adjustEstimate?: string;
            body?: {
                author?: {
                    active?: boolean;
                    avatarUrls?: Record<string, string>;
                    displayName?: string;
                    emailAddress?: string;
                    key?: string;
                    name?: string;
                    self?: string;
                    timeZone?: string;
                    [key: string]: unknown;
                };
                comment?: string;
                created?: string;
                id?: string;
                issueId?: string;
                self?: string;
                started?: string;
                timeSpent?: string;
                timeSpentSeconds?: number;
                updateAuthor?: {
                    active?: boolean;
                    avatarUrls?: Record<string, string>;
                    displayName?: string;
                    emailAddress?: string;
                    key?: string;
                    name?: string;
                    self?: string;
                    timeZone?: string;
                    [key: string]: unknown;
                };
                updated?: string;
                visibility?: {
                    type?: "role"
                    | "group"
                    | string & {};
                    value?: string;
                    [key: string]: unknown;
                };
                [key: string]: unknown;
            };
            id: string;
            issueIdOrKey: string;
            newEstimate?: string;
        }
        • OptionaladjustEstimate?: string

          Allows you to provide specific instructions to update the remaining time estimate of the issue. Valid values are: new, leave, auto

        • Optionalbody?: {
              author?: {
                  active?: boolean;
                  avatarUrls?: Record<string, string>;
                  displayName?: string;
                  emailAddress?: string;
                  key?: string;
                  name?: string;
                  self?: string;
                  timeZone?: string;
                  [key: string]: unknown;
              };
              comment?: string;
              created?: string;
              id?: string;
              issueId?: string;
              self?: string;
              started?: string;
              timeSpent?: string;
              timeSpentSeconds?: number;
              updateAuthor?: {
                  active?: boolean;
                  avatarUrls?: Record<string, string>;
                  displayName?: string;
                  emailAddress?: string;
                  key?: string;
                  name?: string;
                  self?: string;
                  timeZone?: string;
                  [key: string]: unknown;
              };
              updated?: string;
              visibility?: {
                  type?: "role"
                  | "group"
                  | string & {};
                  value?: string;
                  [key: string]: unknown;
              };
              [key: string]: unknown;
          }
        • id: string

          Id of the worklog to be updated

        • issueIdOrKey: string

          A string containing the issue id or key the worklog belongs to

        • OptionalnewEstimate?: string

          Required when 'new' is selected for adjustEstimate

      • Optionaloptions: RequestOptions

      Returns Promise<
          {
              author?: {
                  active?: boolean;
                  avatarUrls?: Record<string, string>;
                  displayName?: string;
                  emailAddress?: string;
                  key?: string;
                  name?: string;
                  self?: string;
                  timeZone?: string;
                  [key: string]: unknown;
              };
              comment?: string;
              created?: string;
              id?: string;
              issueId?: string;
              self?: string;
              started?: string;
              timeSpent?: string;
              timeSpentSeconds?: number;
              updateAuthor?: {
                  active?: boolean;
                  avatarUrls?: Record<string, string>;
                  displayName?: string;
                  emailAddress?: string;
                  key?: string;
                  name?: string;
                  self?: string;
                  timeZone?: string;
                  [key: string]: unknown;
              };
              updated?: string;
              visibility?: {
                  type?: "role"
                  | "group"
                  | string & {};
                  value?: string;
                  [key: string]: unknown;
              };
              [key: string]: unknown;
          },
      >