Page MenuHomePhabricator

Draft revisions and the Herald "Is newly created" condition interact badly
Closed, InvalidPublic


Herald rules that match "Is newly created" do not work as expected when Drafts are enabled.


  • Enable prototypes.
  • Write a herald rule that watches revisions and specifies a "Is newly created" condition, with a "send email" action.
  • Create a new revision.

No email is sent when the revision promotes out of Draft state.

Example rule: H170 Watch Revisions

First pass (creation):

Third pass (promotion):

All passes:

See T13027, D18819.

Event Timeline

epriestley added a subscriber: epriestley.

This is expected: the revision is not newly created.

You likely want this rule instead:

[ Repository ][ is any of ][ X ]
Take actions [ only the first time this rule matches ]:
[ Send me an email ]

Note the use of "only the first time this rule matches".

This is expected: the revision is not newly created.

Or, specifically, there are two possible triggers:

  • When the revision is created, it is "newly created", but it can not send email, so the rule does not evaluate and has no effect.
  • When the revision promotes from draft and can send email, it is no longer "newly created", so the rule has no effect.