diff --git a/docs/issues/issues.md b/docs/issues/issues.md index 8936996..0d7cba3 100644 --- a/docs/issues/issues.md +++ b/docs/issues/issues.md @@ -26,6 +26,9 @@ $issue = $youtrack ``` Returns the data of the newly created issue. The return fields can also be defined here via `->fields()`. +##### `update($issueId, $parameter)` +Updates an issue base on the Issue id. + ##### `customFields($issueId)` Returns all custom fields based on the issue ID. diff --git a/src/Api/Issue.php b/src/Api/Issue.php index 60ca1e2..ef607b7 100644 --- a/src/Api/Issue.php +++ b/src/Api/Issue.php @@ -125,9 +125,9 @@ public function create(array $parameter): array /** * Update an existing issue. */ - public function update(): array + public function update(string $issueId, array $parameter): array { - // ToDo: https://www.jetbrains.com/help/youtrack/devportal/api-usecase-update-text-field-value.html + return $this->post("issues/$issueId", $parameter); } /**