1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-21 09:48:47 +02:00
phorge-phorge/src/applications/transactions
epriestley 474d528c3b Allow numeric constants to act as aliases for task priorities in the web UI <select />
Summary:
Ref T12124. This is a fairly narrow fix for existing saved EditEngine forms with a default priority value.

These saved forms have a numeric (or probably "string-numeric") default value, like "50". They lost their meaning after D18111, when "50" no longer appears in the dropdown. Instead, these forms all select the highest available priority.

At time of writing, this form was broken on this install, for example:

> https://secure.phabricator.com/transactions/editengine/maniphest.task/view/13/

Additionally, `/task/edit/form/123/?priority=...` (for templating forms) stopped working with `priority=50`. This isn't nearly as important, but a larger and more sudden compatiblity break than we need to make.

Add support for an "alias map" on `<select />` controls, so if the value comes in with something we don't recognize we'll treat it like some other value. Then alias all the numeric constants -- and other keywords -- to the right constants.

This ended up only affecting the `<select />` control in the web UI.

Test Plan:
  - On `stable`, created a form with "Priority: Low".
  - Before patch: form has "Priority: Unbreak Now!" on `master`.
  - After patch: form has "Priority: Low" again.
  - Used `?priority=25`, `?priority=wish`, `?priority=wishlist` to template forms: all forms worked.

Reviewers: amckinley, chad

Reviewed By: amckinley

Maniphest Tasks: T12124

Differential Revision: https://secure.phabricator.com/D18134
2017-06-19 14:06:34 -07:00
..
application Allow EditEngine forms for objects which support subtyping to have a subtype configured 2017-03-02 04:18:06 -08:00
commentaction When accepting revisions, allow users to accept on behalf of a subset of reviewers 2017-03-22 14:25:04 -07:00
constants When an object which supports subtypes is created, set its subtype to the creating form's subtype 2017-03-02 04:18:23 -08:00
controller Remove duplicate "Change Default Values" action in form editing workflow 2017-03-22 09:50:38 -07:00
data Don't re-mention users for comment edits 2016-06-13 13:57:59 -07:00
draft Show yellow "draft" bubble in Audit 2017-01-16 10:28:59 -08:00
edges Add a generic "edge.search" method 2017-03-04 15:26:29 -08:00
editengine Provide UI hints about task subtypes 2017-05-26 13:58:41 -07:00
editfield Allow numeric constants to act as aliases for task priorities in the web UI <select /> 2017-06-19 14:06:34 -07:00
editor Migrate Project names to modular transactions 2017-05-17 17:12:22 -07:00
edittype Make stored custom fields work with v3 EditEngine API 2016-12-16 10:09:03 -08:00
engineextension Prevent users from taking "edit"-like actions via comment forms if they don't have edit permission 2017-03-02 16:56:57 -08:00
error Allow users to unset "Editor", tailor short error messages properly on settings forms 2016-06-05 14:03:02 -07:00
exception Mark some strings for translation 2015-06-09 23:06:52 +10:00
feed Add AuthorHref to feed story images 2017-02-07 10:09:00 -08:00
interface Transactions - adding willRenderTimeline to handle tricky cases 2014-12-04 13:58:52 -08:00
phid Allow ApplicationEditor forms to be reconfigured 2015-11-10 10:24:40 -08:00
query When editing a subtyped object, use edit forms of the same subtype 2017-03-02 04:24:28 -08:00
replyhandler Modularize content sources 2016-03-26 11:59:45 -07:00
response Make inline comment preview and submission mostly work on EditEngine 2016-12-31 10:10:29 -08:00
storage Make Project slug/hashtag transactions render a little more nicely 2017-05-19 13:59:27 -07:00
typeahead Don't allow forms which can't create objects to be added to profile menus 2017-02-16 15:45:11 -08:00
view Add Badges to UserCache 2017-03-17 10:38:17 -07:00
worker Cache user notification and message counts 2016-06-05 08:52:43 -07:00
xaction Modularize application transactions in Paste, mostly 2016-06-14 06:13:28 -07:00