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, Dec 8, 12:26 PM
Unknown Object (File)
Thu, Dec 5, 9:12 AM
Unknown Object (File)
Sat, Nov 30, 9:50 AM
Unknown Object (File)
Nov 26 2024, 11:59 PM
Unknown Object (File)
Nov 26 2024, 3:54 PM
Unknown Object (File)
Nov 26 2024, 3:54 PM
Unknown Object (File)
Nov 26 2024, 3:54 PM
Unknown Object (File)
Nov 26 2024, 3:54 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