Page MenuHomePhabricator

Herald - make herald condition of herald rule display better
ClosedPublic

Authored by btrahan on Feb 10 2014, 9:44 PM.
Tags
None
Referenced Files
F14104205: D8186.diff
Tue, Nov 26, 11:59 PM
F14101243: D8186.id18514.diff
Tue, Nov 26, 3:54 PM
F14101242: D8186.id18511.diff
Tue, Nov 26, 3:54 PM
F14101241: D8186.id.diff
Tue, Nov 26, 3:54 PM
F14101240: D8186.diff
Tue, Nov 26, 3:54 PM
Unknown Object (File)
Sat, Nov 23, 11:01 AM
Unknown Object (File)
Sat, Nov 23, 10:41 AM
Unknown Object (File)
Sun, Nov 17, 6:25 AM

Details

Summary

...by the surprising step of changing how this data is stored from id to phid. Also a small fix to not allow "disabled" rules to be used as herald rule conditions, i.e. can't make a rule that depends on a disabled rule.

Test Plan

viewed existing herald rule that had a rule condition and noted nice new display using handle. made a new rule that had a rule condition and verified it worked correctly.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

src/applications/diffusion/herald/HeraldPreCommitContentAdapter.php
47

i missed this cleanup in a prior diff

This is really nice! One inline.

src/applications/herald/controller/HeraldRuleController.php
636–637

Consider removing this, or maybe showing "(Disabled)" in the UI instead. The problem we run into is that if H2 depends on H1, but H1 is disabled, the mere act of editing H2 will modify it, since H1 won't be available in the dropdown. This is surprising and unexpected.

A cleaner fix is probably to render names as "Rule Name" for enabled rules and "Rule Name (Disabled)" for disabled rules.

btrahan updated this revision to Unknown Object (????).Feb 10 2014, 10:19 PM
  • change the mfilter to a foreach() that adds pht('(Disabled)') to rule names in the select