Page MenuHomePhabricator

add ManiphestProjectTaskTransactionsConduitAPIMethod for #DataDataData
ClosedPublic

Authored by mmodell on Jun 10 2021, 5:18 PM.

Details

Maniphest Tasks
T148805: Phab feature request: Cycle time for a task entering a column to resolution, with support for wildcards
Reviewers
Mhurd
mmodell
Patch without arc
git checkout -b D1195 && curl -L https://phabricator.wikimedia.org/D1195?download=true | git apply
Summary

New conduit api method fetches all transactions for all tasks that were ever on a given workboard. This is needed for calculating workboard metrics efficiently.
refs: T148805

Test Plan

Tested the api in phab's api console: [/conduit/method/maniphest.project.task.transactions/ console for maniphest.project.task.transactions]

Diff Detail

Repository
rPHAB Phabricator
Branch
ProjectTaskTransactionsConduitApiMethod (branched from wmf/stable)
Lint
Lint Errors
SeverityLocationCodeMessage
Error/srv/phab/libext/misc/scripts/init/init-script.php:3PHL3One Class Per File
Error/srv/phab/libext/misc/src/other/CustomLoginHandler.php:6PHL1Unknown Symbol
Errorsrc/applications/maniphest/conduit/ManiphestProjectTaskTransactionsConduitAPIMethod.php:40XHP45PHP Compatibility
Errorsrc/applications/maniphest/conduit/ManiphestProjectTaskTransactionsConduitAPIMethod.php:66XHP45PHP Compatibility
Errorsrc/applications/maniphest/conduit/ManiphestProjectTaskTransactionsConduitAPIMethod.php:81XHP45PHP Compatibility
Errorsrc/applications/metamta/adapter/PhabricatorMailImplementationPHPMailerAdapter.php:4PHL1Unknown Symbol
Warningsrc/applications/maniphest/conduit/ManiphestProjectTaskTransactionsConduitAPIMethod.php:11TXT3Line Too Long
Unit
Test Failures
Build Status
Buildable 3290
Build 5451: arc lint + arc unit

Unit TestsFailed

TimeTest
184 msPhabricatorLibraryTestCase::testEverythingImplemented
EXCEPTION (PhutilMissingSymbolException): Failed to load symbol "PhabricatorMailImplementationPHPMailerAdapter" (of type "class or interface"). The symbol map for library 'phabricator' (at '/srv/phab/phabricator/src') claims this class or interface is defined in 'applications/metamta/adapter/PhabricatorMailImplementationPHPMailerAdapter.php', but loading that source file did not cause the class or interface to become defined.
356 msPhabricatorLibraryTestCase::testMethodVisibility
EXCEPTION (PhutilMissingSymbolException): Failed to load symbol "PhabricatorMailImplementationAdapter" (of type "class or interface"). The class or interface "PhabricatorMailImplementationAdapter" is not defined in the library map of any loaded library.
290 msPhabricatorCelerityTestCase::testCelerityMaps
1 assertion passed.
14 msPhabricatorConduitTestCase::testConduitMethods
1 assertion passed.
0 msPhabricatorInfrastructureTestCase::testApplicationsInstalled
1 assertion passed.
View Full Test Results (2 Failed · 5 Passed)

Event Timeline

mmodell created this revision.
  • update arc lint to use custom settings for wikimedia

Sample output from my test instance:

{
  "70": [
    {
      "taskID": "70",
      "action": "Updated",
      "title": "<a href=\"/p/mmodell/\" class=\"phui-handle phui-link-person\" data-sigil=\"hovercard\" data-meta=\"0_0\">mmodell</a> updated Other Assignee, added: <a href=\"/p/test/\" class=\"phui-handle phui-link-person\" data-sigil=\"hovercard\" data-meta=\"0_1\">test</a>; removed: <a href=\"/p/Cthomas/\" class=\"phui-handle phui-link-person\" data-sigil=\"hovercard\" data-meta=\"0_2\">Cthomas</a>.",
      "transactionID": "2463",
      "transactionPHID": "PHID-XACT-TASK-q3kgekompffi3cd",
      "transactionType": "core:customfield",
      "oldValue": "[\"PHID-USER-ddyn5wzap7bbovummpmv\"]",
      "newValue": "[\"PHID-USER-hhhqm7daob4tbsclwd6o\"]",
      "meta": {
        "customfield:key": "std:maniphest:train.backup",
        "core.groupID": "75qmm7a2xx7d7cggi46x5kvpdexdwdok"
      },
      "comments": null,
      "authorPHID": "PHID-USER-iermt5ebieihtsbuwabp",
      "dateCreated": "1622095237"
    },
    {
      "taskID": "70",
      "action": "Updated",
      "title": "<a href=\"/p/mmodell/\" class=\"phui-handle phui-link-person\" data-sigil=\"hovercard\" data-meta=\"0_3\">mmodell</a> updated Other Assignee, added: <a href=\"/p/Cthomas/\" class=\"phui-handle phui-link-person\" data-sigil=\"hovercard\" data-meta=\"0_4\">Cthomas</a>.",
      "transactionID": "2462",
      "transactionPHID": "PHID-XACT-TASK-mqyw5xwnwwb2fnr",
      "transactionType": "core:customfield",
      "oldValue": null,
      "newValue": "[\"PHID-USER-ddyn5wzap7bbovummpmv\"]",
      "meta": {
        "customfield:key": "std:maniphest:train.backup",
        "core.groupID": "qw73w6xhuazgqhjdburobyrzk3kw6rey"
      },
      "comments": null,
      "authorPHID": "PHID-USER-iermt5ebieihtsbuwabp",
      "dateCreated": "1622070746"
    },
    {
      "taskID": "70",
      "action": "Updated",
      "title": "<a href=\"/p/mmodell/\" class=\"phui-handle phui-link-person\" data-sigil=\"hovercard\" data-meta=\"0_5\">mmodell</a> set the point value for this task to <span class=\"phui-timeline-value\">5</span>.",
      "transactionID": "2412",
      "transactionPHID": "PHID-XACT-TASK-hv26wowuggssjqx",
      "transactionType": "points",
      "oldValue": null,
      "newValue": 5,
      "meta": {
        "core.groupID": "4x43ltaxz47oqsbkvilock2wpy5byg6z"
      },
      "comments": null,
      "authorPHID": "PHID-USER-iermt5ebieihtsbuwabp",
      "dateCreated": "1590690747"
    },
    {
      "taskID": "70",
      "action": "Updated",
      "title": "<a href=\"/p/mmodell/\" class=\"phui-handle phui-link-person\" data-sigil=\"hovercard\" data-meta=\"0_6\">mmodell</a> edited projects, added <a href=\"/tag/super-project/\" class=\"phui-handle\" data-sigil=\"hovercard\" data-meta=\"0_7\">Super-project</a>; removed <a href=\"/project/view/16/\" class=\"phui-handle\" data-sigil=\"hovercard\" data-meta=\"0_8\">Super-project (four)</a>.",
      "transactionID": "2400",
      "transactionPHID": "PHID-XACT-TASK-ywk6wwy5fiioslq",
      "transactionType": "core:edge",
      "oldValue": [
        "PHID-PROJ-2zotkbwwpznqdrh5ar6i"
      ],
      "newValue": [
        "PHID-PROJ-f6ftlypg3zvj2o5lhrzp"
      ],
      "meta": {
        "edge:type": 41,
        "core.groupID": "k7t2ng7n76geufnwkgnh35dhhn6tykqf"
      },
      "comments": null,
      "authorPHID": "PHID-USER-iermt5ebieihtsbuwabp",
      "dateCreated": "1586899924"
    },
    {
      "taskID": "70",
      "action": "Changed Project Column",
      "title": "<a href=\"/p/mmodell/\" class=\"phui-handle phui-link-person\" data-sigil=\"hovercard\" data-meta=\"0_9\">mmodell</a> moved this task from <a href=\"/project/board/5/\" class=\"phui-handle\" data-sigil=\"hovercard\" data-meta=\"0_10\">four</a> to <a href=\"/project/board/5/\" class=\"phui-handle\" data-sigil=\"hovercard\" data-meta=\"0_11\">Backlog</a> on the <a href=\"/tag/super-project/\" class=\"phui-handle\" data-sigil=\"hovercard\" data-meta=\"0_12\">Super-project</a> board.",
      "transactionID": "2399",
      "transactionPHID": "PHID-XACT-TASK-gefksdbas3v2kbf",
      "transactionType": "core:columns",
      "oldValue": null,
      "newValue": [
        {
          "columnPHID": "PHID-PCOL-xeidfu4y25l6i3sblv6n",
          "beforePHIDs": [],
          "afterPHIDs": [],
          "boardPHID": "PHID-PROJ-f6ftlypg3zvj2o5lhrzp",
          "fromColumnPHIDs": {
            "PHID-PCOL-a5ifdgxejlpcepfzonc5": "PHID-PCOL-a5ifdgxejlpcepfzonc5"
          }
        }
      ],
      "meta": {
        "core.groupID": "k7t2ng7n76geufnwkgnh35dhhn6tykqf"
      },
      "comments": null,
      "authorPHID": "PHID-USER-iermt5ebieihtsbuwabp",
      "dateCreated": "1586899924"
    },
    {
      "taskID": "70",
      "action": "Updated",
      "title": "<a href=\"/p/mmodell/\" class=\"phui-handle phui-link-person\" data-sigil=\"hovercard\" data-meta=\"0_13\">mmodell</a> added a parent task: <a href=\"/T1\" class=\"phui-handle\" data-sigil=\"hovercard\" data-meta=\"0_14\">T1: First!</a>.",
      "transactionID": "1060",
      "transactionPHID": "PHID-XACT-TASK-jrvxttyqlpbhkd5",
      "transactionType": "core:edge",
      "oldValue": [],
      "newValue": {
        "PHID-TASK-avabak4f4wht3jiirzky": {
          "dst": "PHID-TASK-avabak4f4wht3jiirzky",
          "type": 4,
          "data": []
        }
      },
      "meta": {
        "edge:type": 4
      },
      "comments": null,
      "authorPHID": "PHID-USER-iermt5ebieihtsbuwabp",
      "dateCreated": "1473290957"
    },
    {
      "taskID": "70",
      "action": "Updated",
      "title": "<a href=\"/p/mmodell/\" class=\"phui-handle phui-link-person\" data-sigil=\"hovercard\" data-meta=\"0_15\">mmodell</a> removed a subtask: <a href=\"/T118\" class=\"phui-handle\" data-sigil=\"hovercard\" data-meta=\"0_16\">T118: Sit incididunt ut anim aute laboris, &quot;Amet magna nisi dolore.&quot;</a>.",
      "transactionID": "957",
      "transactionPHID": "PHID-XACT-TASK-q5zzlkd2y7woawd",
      "transactionType": "core:edge",
      "oldValue": {
        "PHID-TASK-colzsydkh2mfj2bz6nhq": {
          "src": "PHID-TASK-jsoqgwjjmmocchctz5fr",
          "type": "3",
          "dst": "PHID-TASK-colzsydkh2mfj2bz6nhq",
          "dateCreated": "1468578059",
          "seq": "0",
          "dataID": null,
          "data": []
        }
      },
      "newValue": [],
      "meta": {
        "edge:type": 3
      },
      "comments": null,
      "authorPHID": "PHID-USER-iermt5ebieihtsbuwabp",
      "dateCreated": "1468578262"
    },
    {
      "taskID": "70",
      "action": "Updated",
      "title": "<a href=\"/p/mmodell/\" class=\"phui-handle phui-link-person\" data-sigil=\"hovercard\" data-meta=\"0_17\">mmodell</a> added a subtask: <a href=\"/T118\" class=\"phui-handle\" data-sigil=\"hovercard\" data-meta=\"0_18\">T118: Sit incididunt ut anim aute laboris, &quot;Amet magna nisi dolore.&quot;</a>.",
      "transactionID": "939",
      "transactionPHID": "PHID-XACT-TASK-6dsysdjpsrnxjhu",
      "transactionType": "core:edge",
      "oldValue": [],
      "newValue": {
        "PHID-TASK-colzsydkh2mfj2bz6nhq": {
          "dst": "PHID-TASK-colzsydkh2mfj2bz6nhq",
          "type": 3,
          "data": []
        }
      },
      "meta": {
        "edge:type": 3
      },
      "comments": null,
      "authorPHID": "PHID-USER-iermt5ebieihtsbuwabp",
      "dateCreated": "1468578059"
    },
    {
      "taskID": "70",
      "action": "Updated",
      "title": "<a href=\"/p/test/\" class=\"phui-handle phui-link-person\" data-sigil=\"hovercard\" data-meta=\"0_19\">test</a> added projects: <a href=\"/project/view/16/\" class=\"phui-handle\" data-sigil=\"hovercard\" data-meta=\"0_20\">Super-project (four)</a>, <a href=\"/project/view/9/\" class=\"phui-handle\" data-sigil=\"hovercard\" data-meta=\"0_21\">Another Project (Milestone 1)</a>.",
      "transactionID": "547",
      "transactionPHID": "PHID-XACT-TASK-ufr2z5ms7s6jfkg",
      "transactionType": "core:edge",
      "oldValue": [],
      "newValue": {
        "PHID-PROJ-2zotkbwwpznqdrh5ar6i": {
          "dst": "PHID-PROJ-2zotkbwwpznqdrh5ar6i",
          "type": 41,
          "data": []
        },
        "PHID-PROJ-gycmyn6dvqzuqtlermjm": {
          "dst": "PHID-PROJ-gycmyn6dvqzuqtlermjm",
          "type": 41,
          "data": []
        }
      },
      "meta": {
        "edge:type": 41
      },
      "comments": null,
      "authorPHID": "PHID-USER-hhhqm7daob4tbsclwd6o",
      "dateCreated": "1468575800"
    },
    {
      "taskID": "70",
      "action": "Changed Subscribers",
      "title": "<a href=\"/p/test/\" class=\"phui-handle phui-link-person\" data-sigil=\"hovercard\" data-meta=\"0_22\">test</a> added subscribers: <a href=\"/p/mmodell/\" class=\"phui-handle phui-link-person\" data-sigil=\"hovercard\" data-meta=\"0_23\">mmodell</a>, <a href=\"/p/test/\" class=\"phui-handle phui-link-person\" data-sigil=\"hovercard\" data-meta=\"0_24\">test</a>.",
      "transactionID": "546",
      "transactionPHID": "PHID-XACT-TASK-jjlkrhqn6sde5jl",
      "transactionType": "core:subscribers",
      "oldValue": [],
      "newValue": [
        "PHID-USER-iermt5ebieihtsbuwabp",
        "PHID-USER-hhhqm7daob4tbsclwd6o"
      ],
      "meta": [],
      "comments": null,
      "authorPHID": "PHID-USER-hhhqm7daob4tbsclwd6o",
      "dateCreated": "1468575800"
    },
    {
      "taskID": "70",
      "action": "Raised Priority",
      "title": "<a href=\"/p/test/\" class=\"phui-handle phui-link-person\" data-sigil=\"hovercard\" data-meta=\"0_25\">test</a> raised the priority of this task from <span class=\"phui-timeline-value\"></span> to <span class=\"phui-timeline-value\">Normal</span>.",
      "transactionID": "545",
      "transactionPHID": "PHID-XACT-TASK-65ajxh67lpv267j",
      "transactionType": "priority",
      "oldValue": null,
      "newValue": 50,
      "meta": [],
      "comments": null,
      "authorPHID": "PHID-USER-hhhqm7daob4tbsclwd6o",
      "dateCreated": "1468575800"
    },
    {
      "taskID": "70",
      "action": "Reopened",
      "title": "<a href=\"/p/test/\" class=\"phui-handle phui-link-person\" data-sigil=\"hovercard\" data-meta=\"0_26\">test</a> reopened this task as <span class=\"phui-timeline-value\">Open</span>.",
      "transactionID": "544",
      "transactionPHID": "PHID-XACT-TASK-rzhyjmjqog2u5ps",
      "transactionType": "status",
      "oldValue": null,
      "newValue": "open",
      "meta": [],
      "comments": null,
      "authorPHID": "PHID-USER-hhhqm7daob4tbsclwd6o",
      "dateCreated": "1468575800"
    },
    {
      "taskID": "70",
      "action": "Assigned",
      "title": "<a href=\"/p/test/\" class=\"phui-handle phui-link-person\" data-sigil=\"hovercard\" data-meta=\"0_27\">test</a> assigned this task to <a href=\"/p/mmodell/\" class=\"phui-handle phui-link-person\">mmodell</a>.",
      "transactionID": "543",
      "transactionPHID": "PHID-XACT-TASK-7rthmcdidlhgllu",
      "transactionType": "reassign",
      "oldValue": null,
      "newValue": "PHID-USER-iermt5ebieihtsbuwabp",
      "meta": [],
      "comments": null,
      "authorPHID": "PHID-USER-hhhqm7daob4tbsclwd6o",
      "dateCreated": "1468575800"
    },
    {
      "taskID": "70",
      "action": "Edited",
      "title": "<a href=\"/p/test/\" class=\"phui-handle phui-link-person\" data-sigil=\"hovercard\" data-meta=\"0_28\">test</a> updated the task description.",
      "transactionID": "542",
      "transactionPHID": "PHID-XACT-TASK-yf63kt5diyf4yec",
      "transactionType": "description",
      "oldValue": null,
      "newValue": "Amet aliquip elit excepteur. Ipsum ipsum cillum! Ipsum cillum id fugiat? Amet reprehenderit. Lorem adipisicing id velit fugiat reprehenderit eu! Lorem tempor amet mollit; cupidatat laboris pariatur ut irure. Dolor nostrud ut duis elit ea? Amet in: aliquip, qui, ipsum qui. Dolor ut ea consectetur esse mollit ipsum; magna ullamco veniam laboris officia. Lorem amet ea cupidatat! Amet eiusmod et aliqua. Sit minim ad. Lorem cupidatat lorem elit ipsum sint deserunt, \"Amet dolore aute mollit ex in.\" Dolor in cupidatat est magna dolor cillum. Amet eu est aliquip quis culpa nisi. Dolor mollit veniam incididunt ut! Sit amet velit nostrud deserunt? Sit sit mollit reprehenderit pariatur. Amet qui do aliquip sit labore (\"Amet Dolor Lorem\") ipsum proident. Sit aute cupidatat ullamco amet adipisicing (\"Amet Ipsum Lorem\") ad ullamco nostrud ex sunt. Amet adipisicing sed pariatur. Ipsum eiusmod proident ea mollit pariatur. Amet culpa voluptate qui consequat aliqua commodo? Lorem laborum esse reprehenderit sed labore exercitation. Ipsum voluptate cillum fugiat laborum, \"Dolor voluptate.\" Dolor incididunt cupidatat (\"Dolor Amet Lorem\") ea in excepteur elit deserunt qui. Dolor esse tempor laboris consequat exercitation! Ipsum cillum? Amet irure veniam dolor veniam duis! Dolor lorem magna do veniam aliqua consequat, \"Sit sint quis laboris esse.\" Sit nostrud lorem cillum quis ut ullamco? Dolor cupidatat magna sint. Amet minim quis sint irure commodo. Ipsum enim occaecat ipsum ad irure. Sit nostrud dolore ad id ex; veniam laborum voluptate consequat nulla. Ipsum aliqua? Dolor dolor elit cillum esse exercitation dolore! Sit occaecat.",
      "meta": [],
      "comments": null,
      "authorPHID": "PHID-USER-hhhqm7daob4tbsclwd6o",
      "dateCreated": "1468575800"
    },
    {
      "taskID": "70",
      "action": "Created",
      "title": "<a href=\"/p/test/\" class=\"phui-handle phui-link-person\" data-sigil=\"hovercard\" data-meta=\"0_29\">test</a> created this task.",
      "transactionID": "541",
      "transactionPHID": "PHID-XACT-TASK-roqapycmv737jeh",
      "transactionType": "title",
      "oldValue": null,
      "newValue": "Dolor est culpa excepteur fugiat non, \"Amet consequat sunt ad cupidatat.\"",
      "meta": [],
      "comments": null,
      "authorPHID": "PHID-USER-hhhqm7daob4tbsclwd6o",
      "dateCreated": "1468575800"
    }
  ]
}
This revision is now accepted and ready to land.Jun 23 2021, 5:49 PM