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/maniphest
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
..
__tests__ Use keywords instead of ints to update task priority in ManiphestEditEngine 2017-06-14 14:43:03 -07:00
application Remove counts from home navigation 2017-01-21 13:55:40 -08:00
bulk Use keywords instead of ints to update task priority in ManiphestEditEngine 2017-06-14 14:43:03 -07:00
capability Simplify the implementation of PhabricatorPolicyCapability subclasses 2014-07-25 08:25:42 +10:00
command Use keywords instead of ints to update task priority in ManiphestEditEngine 2017-06-14 14:43:03 -07:00
conduit Use keywords instead of ints to update task priority in ManiphestEditEngine 2017-06-14 14:43:03 -07:00
config Provide UI hints about task subtypes 2017-05-26 13:58:41 -07:00
constants Allow numeric constants to act as aliases for task priorities in the web UI <select /> 2017-06-19 14:06:34 -07:00
controller Use keywords instead of ints to update task priority in ManiphestEditEngine 2017-06-14 14:43:03 -07:00
edge Expose the commit/task/revision relationship edges to "edge.search" 2017-04-02 19:49:55 -07:00
editor Allow numeric constants to act as aliases for task priorities in the web UI <select /> 2017-06-19 14:06:34 -07:00
engineextension New hovercard UI for Maniphest Tasks 2017-04-23 18:58:08 -07:00
export Consistently refer to 'Projects' as 'Tags' 2016-04-19 16:48:21 +00:00
field Fix errors found by PHPStan 2017-02-17 10:10:15 +00:00
herald Use keywords instead of ints to update task priority in ManiphestEditEngine 2017-06-14 14:43:03 -07:00
httpparametertype Make "Create Subtask" work properly in EditEngine 2015-12-08 14:29:58 -08:00
lipsum Use keywords instead of ints to update task priority in ManiphestEditEngine 2017-06-14 14:43:03 -07:00
mail Update Maniphest for modular transactions 2017-05-15 10:29:06 -07:00
phid Mark PhabricatorPHIDType::getPHIDTypeApplicationClass() as abstract 2015-11-03 06:47:12 +11:00
policyrule Allow PolicyRules to serve as "Object Policies" 2015-06-13 15:44:38 -07:00
query Disperse task subpriorities in blocks 2017-05-19 15:45:14 -07:00
relationship Update Maniphest for modular transactions 2017-05-15 10:29:06 -07:00
remarkup Rename PhutilRemarkupRule subclasses 2014-08-05 00:55:43 +10:00
search Convert all "DocumentIndexers" into "FulltextEngines" 2015-12-21 17:25:23 -08:00
storage Allow numeric constants to act as aliases for task priorities in the web UI <select /> 2017-06-19 14:06:34 -07:00
typeahead Provide UI hints about task subtypes 2017-05-26 13:58:41 -07:00
view Separate button CSS classes 2017-06-05 20:14:34 +00:00
xaction Improve validation errors for changing task priorities 2017-06-19 14:05:47 -07:00