Open Context Protocol is live! 🚀 Read the launch post

updateWorklog

Update worklog

Details

  • Method: PUT
  • Path: /rest/api/3/issue/{issueIdOrKey}/worklog/{id}
  • Operation ID: updateWorklog

Parameters

{
  "issueIdOrKey": {
    "description": "The ID or key the issue.",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "id": {
    "description": "The ID of the worklog record.",
    "required": false,
    "location": "body",
    "type": "string"
  },
  "notifyUsers": {
    "description": "Whether users watching the issue are notified by email.",
    "required": false,
    "location": "query",
    "type": "boolean"
  },
  "adjustEstimate": {
    "description": "Defines how to update the issue's time estimate, the options are:\n\n *  `new` Sets the estimate to a specific value, defined in `newEstimate`.\n *  `leave` Leaves the estimate unchanged.\n *  `auto` Updates the estimate by the difference between the original and updated value of `timeSpent` or `timeSpentSeconds`.",
    "required": false,
    "location": "query",
    "type": "string",
    "enum": [
      "new",
      "leave",
      "manual",
      "auto"
    ]
  },
  "newEstimate": {
    "description": "The value to set as the issue's remaining time estimate, as days (\\#d), hours (\\#h), or minutes (\\#m or \\#). For example, *2d*. Required when `adjustEstimate` is `new`.",
    "required": false,
    "location": "query",
    "type": "string"
  },
  "expand": {
    "description": "Use [expand](#expansion) to include additional information about worklogs in the response. This parameter accepts `properties`, which returns worklog properties.",
    "required": false,
    "location": "query",
    "type": "string"
  },
  "overrideEditableFlag": {
    "description": "Whether the worklog should be added to the issue even if the issue is not editable. For example, because the issue is closed. Connect and Forge app users with *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) can use this flag.",
    "required": false,
    "location": "query",
    "type": "boolean"
  },
  "author": {
    "description": "Details of the user who created the worklog.",
    "required": false,
    "location": "body",
    "type": "string"
  },
  "comment": {
    "description": "A comment about the worklog in [Atlassian Document Format](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/). Optional when creating or updating a worklog.",
    "required": false,
    "location": "body",
    "type": "string"
  },
  "created": {
    "description": "The datetime on which the worklog was created.",
    "required": false,
    "location": "body",
    "type": "string"
  },
  "issueId": {
    "description": "The ID of the issue this worklog is for.",
    "required": false,
    "location": "body",
    "type": "string"
  },
  "properties": {
    "description": "Details of properties for the worklog. Optional when creating or updating a worklog.",
    "required": false,
    "location": "body",
    "type": "array"
  },
  "self": {
    "description": "The URL of the worklog item.",
    "required": false,
    "location": "body",
    "type": "string"
  },
  "started": {
    "description": "The datetime on which the worklog effort was started. Required when creating a worklog. Optional when updating a worklog.",
    "required": false,
    "location": "body",
    "type": "string"
  },
  "timeSpent": {
    "description": "The time spent working on the issue as days (\\#d), hours (\\#h), or minutes (\\#m or \\#). Required when creating a worklog if `timeSpentSeconds` isn't provided. Optional when updating a worklog. Cannot be provided if `timeSpentSecond` is provided.",
    "required": false,
    "location": "body",
    "type": "string"
  },
  "timeSpentSeconds": {
    "description": "The time in seconds spent working on the issue. Required when creating a worklog if `timeSpent` isn't provided. Optional when updating a worklog. Cannot be provided if `timeSpent` is provided.",
    "required": false,
    "location": "body",
    "type": "integer"
  },
  "updateAuthor": {
    "description": "Details of the user who last updated the worklog.",
    "required": false,
    "location": "body",
    "type": "string"
  },
  "updated": {
    "description": "The datetime on which the worklog was last updated.",
    "required": false,
    "location": "body",
    "type": "string"
  },
  "visibility": {
    "description": "Details about any restrictions in the visibility of the worklog. Optional when creating or updating a worklog.",
    "required": false,
    "location": "body",
    "type": "string"
  }
}

Response Schema

{
  "additionalProperties": true,
  "description": "Details of a worklog.",
  "properties": {
    "author": {
      "allOf": [
        {
          "$ref": "#/components/schemas/UserDetails"
        }
      ],
      "description": "Details of the user who created the worklog.",
      "readOnly": true
    },
    "comment": {
      "description": "A comment about the worklog in [Atlassian Document Format](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/). Optional when creating or updating a worklog."
    },
    "created": {
      "description": "The datetime on which the worklog was created.",
      "format": "date-time",
      "readOnly": true,
      "type": "string"
    },
    "id": {
      "description": "The ID of the worklog record.",
      "readOnly": true,
      "type": "string"
    },
    "issueId": {
      "description": "The ID of the issue this worklog is for.",
      "readOnly": true,
      "type": "string"
    },
    "properties": {
      "description": "Details of properties for the worklog. Optional when creating or updating a worklog.",
      "items": {
        "additionalProperties": false,
        "description": "An entity property, for more information see [Entity properties](https://developer.atlassian.com/cloud/jira/platform/jira-entity-properties/).",
        "properties": {
          "key": {
            "description": "The key of the property. Required on create and update.",
            "type": "string"
          },
          "value": {
            "description": "The value of the property. Required on create and update."
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "self": {
      "description": "The URL of the worklog item.",
      "format": "uri",
      "readOnly": true,
      "type": "string"
    },
    "started": {
      "description": "The datetime on which the worklog effort was started. Required when creating a worklog. Optional when updating a worklog.",
      "format": "date-time",
      "type": "string"
    },
    "timeSpent": {
      "description": "The time spent working on the issue as days (\\#d), hours (\\#h), or minutes (\\#m or \\#). Required when creating a worklog if `timeSpentSeconds` isn't provided. Optional when updating a worklog. Cannot be provided if `timeSpentSecond` is provided.",
      "type": "string"
    },
    "timeSpentSeconds": {
      "description": "The time in seconds spent working on the issue. Required when creating a worklog if `timeSpent` isn't provided. Optional when updating a worklog. Cannot be provided if `timeSpent` is provided.",
      "format": "int64",
      "type": "integer"
    },
    "updateAuthor": {
      "allOf": [
        {
          "$ref": "#/components/schemas/UserDetails"
        }
      ],
      "description": "Details of the user who last updated the worklog.",
      "readOnly": true
    },
    "updated": {
      "description": "The datetime on which the worklog was last updated.",
      "format": "date-time",
      "readOnly": true,
      "type": "string"
    },
    "visibility": {
      "allOf": [
        {
          "$ref": "#/components/schemas/Visibility"
        }
      ],
      "description": "Details about any restrictions in the visibility of the worklog. Optional when creating or updating a worklog."
    }
  },
  "type": "object",
  "xml": {
    "name": "worklog"
  }
}

Usage

from ocp_agent import OCPAgent

agent = OCPAgent()
await agent.register_api('jira')

# Call this tool
result = await agent.call_tool('updateWorklog', {
    # Add required parameters here
})