HomePhabricator

Modularize parser for "Closes task X as Y"

Description

Modularize parser for "Closes task X as Y"

Summary:
Ref T3886. Ref T3872. Ref T1812. We have several parsers which look for textual references to other objects, like:

Closes Tx.
Depends on Dy.
Reverts Dz.

Currently, these are pretty hard coded, don't get all the edge cases right, and don't generalize well. They're also implemented in the middle of Differential's field code. So I want to:

  • Share more code so that, e.g., "Tx, Ty" always works (only some rules support it right now);
  • fix bugs in the parser, like T3872;
  • make this a modular, extensible process which runs against custom fields, not a builtin part of fields;
  • make the internals more flexible to accommodate custom stuff like T1812.

This implements the "Verbs optional-noun Object, Optional Other Objects optional-as-something." grammar in a general way so subclasses can just plug in their keywords. Runtime code doesn't touch this yet.

Test Plan: Ran unit tests.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3872, T1812, T3886

Differential Revision: https://secure.phabricator.com/D8261

Details

Provenance
epriestleyAuthored on
epriestleyPushed on Feb 17 2014, 11:53 PM
Reviewer
btrahan
Differential Revision
D8261: Modularize parser for "Closes task X as Y"
Parents
rP7ff539b72948: Fix a bad call in ElasticSearch recovery code
Branches
Unknown
Tags
Unknown
Tasks
Restricted Maniphest Task
T1812: Allow for arbitrary values for task status
Restricted Maniphest Task

Event Timeline