Page MenuHomePhabricator

Autogeneration of Subtasks
Open, LowestPublicFeature

Description

Hi Andre - we spoke at the All-Hands Meeting for a bit around the possibility of autogenerating subtasks in Phabricator. Here's the workflow that I was looking to try and create:

  1. Requestor creates project tag "procurement" task here - https://phabricator.wikimedia.org/maniphest/task/edit/form/66/
  2. A subtask is autogenerated every time by pulling the information entered into the task from Step 1, and fills in the information here in project tag "DC-Ops" - https://phabricator.wikimedia.org/maniphest/task/edit/form/80/

I think you mentioned that it probably wasn't possible to implement, but to create a Phab task for you anyways. Much appreciated in advance for any guidance.

Thanks,
Willy

Event Timeline

Aklapper subscribed.

Heja @wiki_willy, right, this is currently not possible. See upstream https://secure.phabricator.com/T12552 linking to https://secure.phabricator.com/T7190

I am not sure how to recognize / trigger the subtask creation after creating the parent task...
Was wondering if Herald offers anything, but "create a subtask" is not available as an action.
Maybe webhooks, but I don't know enough of that...

After doing that somehow, a script somewhere could use the Conduit API to create the subtask. Basically:

  • Get the internal phid value of the parent task T01234: echo '{"task_id": 01234}' | /path/to/arcanist/bin/arc call-conduit --conduit-uri https://phabricator.wikimedia.org --conduit-token "cli-xxxxx" maniphest.info | jq -r '.response.phid' (to be used in next command, as value for "parents.add")
  • Create new subtask: echo '{"transactions":[{"type": "title", "value":"some summary"}, {"type": "description", "value":"some desc"}, {"type": "priority", "value":"medium"}, {"type":"parents.add", "value":["PHID-TASK-yyyyy"]}, {"type":"projects.set", "value":["DC-Ops"]}, {"type":"status", "value":"open"}]}' | /path/to/arcanist/bin/arc call-conduit --conduit-uri https://phabricator.wikimedia.org --conduit-token "cli-xxxxx" maniphest.edit

No better idea currently. :-/

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 13 2021, 11:41 AM

The Phabricator maintenance bot does something similar for Wiki-Setup tasks. Procurement tasks aren't public so I don't think we can use that bot account here (or host it on WMCS)

(see also slightly related T239378: Disable parent task metadata by default for new sub tasks about the problems with creating subtasks nowadays)

Aklapper triaged this task as Lowest priority.Jul 11 2023, 9:59 AM