HomePhabricator

Distinguish between "bad record format" and "bad record value" when validating…

Description

Distinguish between "bad record format" and "bad record value" when validating Trigger rules

Summary:
Depends on D20416. Ref T13269. See D20329.

If you try to save an "Assign to" rule with no assignee, we currently replace the control with an "InvalidRule" control that isn't editable. We'd prefer to give you an empty field back and let you pick a different value.

Differentiate between "bad record format" (i.e., we can't really do anything with this) and "bad record value" (i.e., everything is structurally fine, you just typed the wrong thing). In the latter case, we still build a properly typed rule for the UI, we just refuse to update storage until you fix the problem.

Test Plan:
First, hit the original issue and got a nicer UI with a more consistent control width (note full-width error):

Screen Shot 2019-04-13 at 9.08.36 AM.png (1×1 px, 202 KB)

Then, applied the rest of the patch and got a normal "fix the issue" form state instead of a dead-end:

Screen Shot 2019-04-13 at 9.29.11 AM.png (952×1 px, 188 KB)

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13269

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