Herald - add support for application emails.

Summary:
Fixes T5039. The trick / possibly lame part here is we only match 1 application email and its undefined which one. e.g. if a user emails us at address x, y, and z only one of those will pick up the mail. Ergo, don't let users define non-sensical herald conditions like "matches all". Also document what I think was non-intuitive about the code with an inline comment; we have to return an array with just a phid from an object and out of context it feels very "what the...???"

Note this needs to be deployed to other applications still, but I think its okay to close T5039 aggressively here since its done from a user story perspective.

Test Plan: set up a herald rule to flag tasks created as blue via app email x. sent an email to x via `bin/mail receive-test` and verified the task had the blue flag

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T5039

Differential Revision: https://secure.phabricator.com/D11564
This commit is contained in:
Bob Trahan
2015-01-29 14:15:38 -08:00
parent ffaed67711
commit ab8f7907de
9 changed files with 72 additions and 13 deletions

View File

@@ -222,6 +222,7 @@ JX.install('HeraldRuleEditor', {
case 'taskstatus':
case 'arcanistprojects':
case 'legaldocuments':
case 'applicationemail':
var tokenizer = this._newTokenizer(type);
input = tokenizer[0];
get_fn = tokenizer[1];