Page MenuHomePhabricator

Add a Herald rule for "new" vs "updated" for Maniphest tasks (and other updatable objects?)
Closed, ResolvedPublic

Description

Currently, you can't distinguish between a Maniphest task which is newly created from email vs updated via email, since they both have an "email" content source. This distinction is useful in order to run special triage rules on bugs@domain.com mail.

Event Timeline

epriestley raised the priority of this task from to Normal.
epriestley updated the task description. (Show Details)
epriestley added a project: Herald.
epriestley added subscribers: btrahan, mbishopim3.
epriestley added a subscriber: epriestley.

Two other similar issues:

  • From T1638, @chengyin wanted priority rules. This is slightly involved since we need a new "value" column for them, and maybe new conditions ("less than", "greater than").
  • A user on IRC wanted to add an "Another Herald Rule" rule, but it looks like we don't support this field. There's no reason not to.

I'll take a gander at this today.

Diff out for task priority.

What's this "another herald rule" rule thing? I am le confused.

It should be a one liner, I think. There's an existing field -- HeraldAdapter::FIELD_RULE, which lets you write a rule like:

[Another herald rule][also matches][some other rule]

This field allows you to write complex nonsense where rules depend on other rules, which is rarely of much use but does solve a few unusual issues fairly cleanly. The implementation of this field should already be general enough to just work, I think, so the fix is probably:

  • Add it as an allowed field to the list of supported fields;
  • poke it and make sure it works;
  • bump the rule version.