Page MenuHomePhorge

Conduit maniphest.gettasktransactions: include metadata and title
Closed, ResolvedPublic

Description

We should 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.

Event Timeline

valerio.bozzolan triaged this task as Wishlist priority.
valerio.bozzolan created this object in space S1 Public.

Maybe interesting, there is this different non-deprecated API:

https://we.phorge.it/api/transaction.search

Example interaction:

echo '{"objectType": "TASK"}' \
  | arc call-conduit --conduit-uri http://phorge.localhost/ -- transaction.search

Example result to get everything about tasks (including title changes):

{
  "error": null,
  "errorMessage": null,
  "response": {
    "data": [
      {
        "id": 146,
        "phid": "PHID-XACT-TASK-s56it4saia3dezh",
        "type": "subscribers",
        "authorPHID": "PHID-USER-ktgdqflnaqzfirxfpu4z",
        "objectPHID": "PHID-TASK-7tovrfcv3whjigkxnoqk",
        "dateCreated": 1723652408,
        "dateModified": 1723652408,
        "groupID": "nlcq535vaks4vdvm7ro7b7bxls3i3r5b",
        "comments": [],
        "fields": {
          "operations": [
            {
              "operation": "add",
              "phid": "PHID-USER-ktgdqflnaqzfirxfpu4z"
            }
          ]
        }
      },
      {
        "id": 145,
        "phid": "PHID-XACT-TASK-loznmemrxe76hov",
        "type": "projects",
        "authorPHID": "PHID-USER-ktgdqflnaqzfirxfpu4z",
        "objectPHID": "PHID-TASK-7tovrfcv3whjigkxnoqk",
        "dateCreated": 1723652408,
        "dateModified": 1723652408,
        "groupID": "nlcq535vaks4vdvm7ro7b7bxls3i3r5b",
        "comments": [],
        "fields": {
          "operations": [
            {
              "operation": "add",
              "phid": "PHID-PROJ-o4ft2ajjndk73ypxrhvq"
            }
          ]
        }
      },
      {
        "id": 144,
        "phid": "PHID-XACT-TASK-jmw2kegqcuwwzkd",
        "type": null,
        "authorPHID": "PHID-USER-ktgdqflnaqzfirxfpu4z",
        "objectPHID": "PHID-TASK-7tovrfcv3whjigkxnoqk",
        "dateCreated": 1723652408,
        "dateModified": 1723652408,
        "groupID": "nlcq535vaks4vdvm7ro7b7bxls3i3r5b",
        "comments": [],
        "fields": []
      },
      {
        "id": 143,
        "phid": "PHID-XACT-TASK-ijrfcsawbtmtglh",
        "type": null,
        "authorPHID": "PHID-USER-ktgdqflnaqzfirxfpu4z",
        "objectPHID": "PHID-TASK-7tovrfcv3whjigkxnoqk",
        "dateCreated": 1723652408,
        "dateModified": 1723652408,
        "groupID": "nlcq535vaks4vdvm7ro7b7bxls3i3r5b",
        "comments": [],
        "fields": []
      },
      {
        "id": 142,
        "phid": "PHID-XACT-TASK-yxsevuehlz5v4jp",
        "type": "description",
        "authorPHID": "PHID-USER-ktgdqflnaqzfirxfpu4z",
        "objectPHID": "PHID-TASK-7tovrfcv3whjigkxnoqk",
        "dateCreated": 1723652408,
        "dateModified": 1723652408,
        "groupID": "nlcq535vaks4vdvm7ro7b7bxls3i3r5b",
        "comments": [],
        "fields": {
          "old": "",
          "new": "LOL"
        }
      },
      {
        "id": 141,
        "phid": "PHID-XACT-TASK-mr5xb2v6pbnk2oy",
        "type": "priority",
        "authorPHID": "PHID-USER-ktgdqflnaqzfirxfpu4z",
        "objectPHID": "PHID-TASK-7tovrfcv3whjigkxnoqk",
        "dateCreated": 1723652408,
        "dateModified": 1723652408,
        "groupID": "nlcq535vaks4vdvm7ro7b7bxls3i3r5b",
        "comments": [],
        "fields": {
          "old": {
            "value": 90,
            "name": "Needs Triage"
          },
          "new": {
            "value": 80,
            "name": "High"
          }
        }
      },
      {
        "id": 140,
        "phid": "PHID-XACT-TASK-dcfcskfjmuca5jt",
        "type": "title",
        "authorPHID": "PHID-USER-ktgdqflnaqzfirxfpu4z",
        "objectPHID": "PHID-TASK-7tovrfcv3whjigkxnoqk",
        "dateCreated": 1723652408,
        "dateModified": 1723652408,
        "groupID": "nlcq535vaks4vdvm7ro7b7bxls3i3r5b",
        "comments": [],
        "fields": {
          "old": "",
          "new": "Test"
        }
      },
      {
        "id": 139,
        "phid": "PHID-XACT-TASK-7fxy4z3b2owd7lo",
        "type": "create",
        "authorPHID": "PHID-USER-ktgdqflnaqzfirxfpu4z",
        "objectPHID": "PHID-TASK-7tovrfcv3whjigkxnoqk",
        "dateCreated": 1723652408,
        "dateModified": 1723652408,
        "groupID": "nlcq535vaks4vdvm7ro7b7bxls3i3r5b",
        "comments": [],
        "fields": []
      }
    ],
    "cursor": {
      "limit": 8,
      "after": "139",
      "before": null
    }
  }
}

Documentation and examples in cURL and PHP:

https://we.phorge.it/conduit/method/transaction.search/