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
Unknown Object (File)
Sun, Nov 17, 6:25 AM
Unknown Object (File)
Fri, Nov 15, 10:05 PM
Unknown Object (File)
Tue, Nov 12, 5:22 AM
Unknown Object (File)
Sun, Nov 10, 11:04 PM
Unknown Object (File)
Fri, Nov 8, 1:02 AM
Unknown Object (File)
Thu, Oct 24, 4:12 AM
Unknown Object (File)
Oct 18 2024, 5:13 AM
Unknown Object (File)
Oct 17 2024, 10:33 PM

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