Homec4science

Reduce code duplication in Herald fields

Authored by epriestley <git@epriestley.com> on Jul 16 2015, 23:11.

Description

Reduce code duplication in Herald fields

Summary:
Ref T8726. I want to modularize values and reduce how hard-coded / copypasta'd they are.

  • Rename get...StandardCondition() to get...StandardType(), since we can drive both conditions and values from it.
  • Rename STANDARD_LIST to STANDARD_PHID_LIST for consistency: all "lists" are lists of PHIDs.
  • For all standard types which don't require typehaeads, lift their logic into the base class.
  • I'll lift typeaheads soon, but need to generalize them first.

Test Plan: Edited various Herald rules, saw value UI generate correctly.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8726

Differential Revision: https://secure.phabricator.com/D13612

Details

Committed
epriestley <git@epriestley.com>Jul 16 2015, 23:11
Pushed
aubortJan 31 2017, 17:16
Parents
rPHfc72b000f0af: Add `repository list-paths` and `repository move-paths`
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHb2b739c709aa: Reduce code duplication in Herald fields (authored by epriestley <git@epriestley.com>).Jul 16 2015, 23:11