From 2494785546935c63f4a6a0af637b7801256a5c29 Mon Sep 17 00:00:00 2001 From: doishub Date: Tue, 21 Feb 2023 16:31:25 +0100 Subject: [PATCH] Issues updating has been added --- docs/issues/issues.md | 3 +++ src/Api/Issue.php | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) 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); } /**