Search code examples
phabricator

Access the history of a task using the Conduit API


I want to be able to use the Phabricator Conduit API to get historical information about a task such as when it was assigned/unassigned and when it moved columns on a workboard.

I've looked through the Conduit API Documentation and I'm able to give a Project PHID and get information on the current state of the tasks on the workboard, but not their history.

This is an example of the information I'd like to get back through the API example


Solution

  • You can use maniphest.gettasktransactions. It's a frozen method, but I don't see any modern methods to get this info.

    Example result:

    {
      "2059": [
        {
          "taskID": "2059",
          "transactionID": "36573",
          "transactionPHID": "PHID-XACT-TASK-4fyapons4cxspcv",
          "transactionType": "core:columns",
          "oldValue": null,
          "newValue": [
            {
              "columnPHID": "PHID-PCOL-l47qpqaqky5cucv53jtj",
              "boardPHID": "PHID-PROJ-ogxwp55og5rqok56vmot",
              "fromColumnPHIDs": {
                "PHID-PCOL-azcgsgut44vew2sfqhh7": "PHID-PCOL-azcgsgut44vew2sfqhh7"
              }
            }
          ],
          "comments": null,
          "authorPHID": "PHID-USER-gimad45egg7tcccxd6co",
          "dateCreated": "1556545748"
        },
        {
          "taskID": "2059",
          "transactionID": "36572",
          "transactionPHID": "PHID-XACT-TASK-y2fjn5yzby4mdz6",
          "transactionType": "core:edge",
          "oldValue": [],
          "newValue": [
            "PHID-CMIT-idy5uamuuz3eespdsmvd"
          ],
          "comments": null,
          "authorPHID": "PHID-USER-gimad45egg7tcccxd6co",
          "dateCreated": "1556545665"
        },
        {
          "taskID": "2059",
          "transactionID": "36382",
          "transactionPHID": "PHID-XACT-TASK-rwanaewpmqpzslc",
          "transactionType": "core:subscribers",
          "oldValue": [
            "PHID-USER-2clcr42jsfygiyne64kq",
            "PHID-USER-whapfbsypxiafuoy3wi5",
            "PHID-USER-gimad45egg7tcccxd6co"
          ],
          "newValue": [
            "PHID-USER-whapfbsypxiafuoy3wi5",
            "PHID-USER-gimad45egg7tcccxd6co"
          ],
          "comments": null,
          "authorPHID": "PHID-USER-2clcr42jsfygiyne64kq",
          "dateCreated": "1555615023"
        },
        [...]