Homec4science

Improve rendering of tokenizer tokens in Herald when editing rules

Authored by epriestley <git@epriestley.com> on Dec 5 2015, 20:09.

Description

Improve rendering of tokenizer tokens in Herald when editing rules

Summary:
Fixes T7848. @jasonfsmitty discussed an issue in great detail there and in D14359, and I completely missed it. Specifically:

  • If you save a "Change status to: Open" rule in Maniphest, and then edit it again, the token shows "Unknown Object (???)" instead of the correct token.
  • That's because loadHandles() has no idea what to do with the value "open", since it's not a real PHID.

The way we render tokenizer tokens in Herald is quite hacky right now. Fortunately, I wrote a slightly better way for EditEngine yesterday or the day before. Use the slightly better way to fix the issue with D14359.

This could still be better than it is, but the badness is mostly hidden now and can be cleaned up later without impacting anything.

Test Plan: Edited a Herald rule with projects and status changes, saw proper tokens.

Reviewers: chad

Reviewed By: chad

Subscribers: jasonfsmitty

Maniphest Tasks: T7848

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

Details

Committed
epriestley <git@epriestley.com>Dec 5 2015, 20:20
Pushed
aubortJan 31 2017, 17:16
Parents
rPH92175488e954: Allow Maniphest statuses and priorities to be disabled
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH82be07315cbf: Improve rendering of tokenizer tokens in Herald when editing rules (authored by epriestley <git@epriestley.com>).Dec 5 2015, 20:20