From 6ec5c88bee24aa2c8817959d98e1a0f7d2f781c9 Mon Sep 17 00:00:00 2001 From: Andre Klapper Date: Wed, 14 Aug 2024 15:16:28 +0200 Subject: [PATCH] Make maniphest.gettasktransactions include metadata and title Summary: Include task title and metadata in Conduit's `maniphest.gettasktransactions` output. This data can for example be used by IRC bots to improve their output (e.g. conditions which changes [not] to emit or text coloring based on metadata). Upstreaming from https://phabricator.wikimedia.org/rPHABf2fd14dc1edeb41aa2874336548cfaa7fa0e87a0 NOTE: this specific API is in "frozen" status. This method is frozen and will eventually be deprecated. New code should use "transaction.search" instead. Closes T15916 Test Plan: Call `maniphest.gettasktransactions` on a task, see two additional fields. Reviewers: O1 Blessed Committers, valerio.bozzolan Reviewed By: O1 Blessed Committers, valerio.bozzolan Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Maniphest Tasks: T15916 Differential Revision: https://we.phorge.it/D25777 --- .../conduit/ManiphestGetTaskTransactionsConduitAPIMethod.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/applications/maniphest/conduit/ManiphestGetTaskTransactionsConduitAPIMethod.php b/src/applications/maniphest/conduit/ManiphestGetTaskTransactionsConduitAPIMethod.php index 357d118bc4..e8eacb6bda 100644 --- a/src/applications/maniphest/conduit/ManiphestGetTaskTransactionsConduitAPIMethod.php +++ b/src/applications/maniphest/conduit/ManiphestGetTaskTransactionsConduitAPIMethod.php @@ -69,11 +69,13 @@ final class ManiphestGetTaskTransactionsConduitAPIMethod $results[$task_id][] = array( 'taskID' => $task_id, + 'title' => (string)$transaction->getTitleForTextMail(), 'transactionID' => $transaction->getID(), 'transactionPHID' => $transaction->getPHID(), 'transactionType' => $transaction->getTransactionType(), 'oldValue' => $transaction->getOldValue(), 'newValue' => $transaction->getNewValue(), + 'meta' => $transaction->getMetadata(), 'comments' => $comments, 'authorPHID' => $transaction->getAuthorPHID(), 'dateCreated' => $transaction->getDateCreated(),