Page MenuHomePhabricator

Error when creating a sub-task from a prefilled URL that includes `column`
Closed, ResolvedPublic

Description

We have a URL we are using to prefill some fields to create some blocking subtasks for a specific effort:

URL looks like:
https://phab.example.com/maniphest/task/edit/form/default/?parent=T####&priority=50&subscribers=user&projects=project&column=674

With the column in place, it crashes:

>>> UNRECOVERABLE FATAL ERROR <<<

Call to a member function getProjectPHID() on a non-object

/path/to/phabricator/src/applications/maniphest/editor/ManiphestTransactionEditor.php:1020


┻━┻ ︵ ¯\_(ツ)_/¯ ︵ ┻━┻

Without the column, it creates the task and places in the default columns. We'd like to have these tasks inherit from the parent tasks column automatically.

Thanks!

Event Timeline

epriestley added a subscriber: epriestley.

column should be a PHID.

I'll make this raise an explicit error instead of fataling.

epriestley created subtask T10502: asdbasdb.
epriestley closed subtask T10502: asdbasdb as Invalid.

Well, sort of. Projects don't get set correctly with explicit column.

D15636 is marked as fixing this. Specifically:

  • We'll no longer fatal.
  • You will now get a mostly-human-readable error if you use an ID (or some other invalid value) instead of a PHID, suggesting what the problem is:

Screen Shot 2016-04-06 at 4.35.58 AM.png (270×1 px, 32 KB)

  • Creating a task into a column will force the corresponding project tag to take effect, even if you remove it. We may change this behavior eventually but it's the simplest behavior and may legitimately be consistent with intent (e.g., tag removal might reasonably indicate "the user cleared the field without thinking before typing stuff" as much as "the user selected 'Create Task' from a column, but did not want to create a task in that column"). But this interaction is generally a complex one and may be refined later.
  • You can now move stuff via the API, and there is documentation to that effect. This may not be terribly useful until there are more ways to get information about columns via the API (see T5214).

Screen Shot 2016-04-06 at 4.43.44 AM.png (970×523 px, 137 KB)

Upshot: using a PHID should now work correctly in all cases I was able to come up with. Using anything else should now fail gracefully with a helpful message.