1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-01 03:02:43 +01:00
phorge-phorge/src/infrastructure
epriestley 635e9c6075 Provide a generic "Datasource" StandardCustomField
Summary:
Ref T9253. See discussion in D13843.

I want to let Drydock blueprints for Almanac services choose those services from a typeahead, but only list appropriate services in the typeahead. To do this:

  - Provide a StandardCustomField for an arbitrary datasource.
  - Adjust the AlmanacServiceDatasource to allow filtering by service class.

This implementation is substantially the same as the one in D13843, with some adjustments:

  - I lifted most of the code in the `Users` standard custom field into a new `Tokenizer` standard custom field.
  - The `Users` and `Datasource` custom fields now extend the `Tokenizer` custom field and can share most of the code it uses.
  - I exposed this field fully as a configurable field. I don't think anyone will ever use it, but this generality costs us nearly nothing and improves consistency.
  - The code in D13843 didn't actually pass the parameters over the wire, since the object that responds to the request is not the same object that renders the field. Use the "parameters" mechanism in datasources to get things passed over the wire.

Test Plan:
  - Created a custom "users" field in Maniphest and made sure it still wokred.
  - Created a custom "almanc services" field in Maniphest and selected some services for a task.
  - With additional changes from D13843, selected an appropriate Almanac service in a new Drydock blueprint.

Reviewers: hach-que, chad

Reviewed By: hach-que, chad

Maniphest Tasks: T9253

Differential Revision: https://secure.phabricator.com/D14111
2015-09-21 04:41:52 -07:00
..
customfield Provide a generic "Datasource" StandardCustomField 2015-09-21 04:41:52 -07:00
daemon Use PhutilClassMapQuery instead of PhutilSymbolLoader 2015-08-14 07:49:01 +10:00
diff Clean up browse/history links in Diffusion 2015-09-10 19:28:49 -07:00
edges Use PhutilClassMapQuery 2015-07-07 22:51:57 +10:00
env Use PhutilClassMapQuery instead of PhutilSymbolLoader 2015-08-14 07:49:01 +10:00
events Use PhutilClassMapQuery instead of PhutilSymbolLoader 2015-08-14 07:49:01 +10:00
internationalization Add some missing translations 2015-08-29 23:29:16 +10:00
javelin Extend from Phobject 2015-06-15 18:02:27 +10:00
lint/linter Tidy up some translation strings 2015-06-14 14:13:16 +10:00
log Extend from Phobject 2015-06-15 18:02:27 +10:00
management Add some of a billing daemon skeleton 2015-01-30 11:29:05 -08:00
markup Use PEAR Text_Figlet to render figlet fonts 2015-09-13 12:31:07 -07:00
query Refine "invalid cursor" exception to have a little more information 2015-07-07 12:52:12 -07:00
sms Various linter fixes 2015-08-11 22:36:55 +10:00
ssh phtize all the things 2015-05-22 21:16:39 +10:00
storage Allow transaction publishers to pass binary data to workers 2015-08-22 15:14:05 -07:00
testing Extend from Phobject 2015-06-15 18:02:27 +10:00
time Extend from Phobject 2015-06-15 18:02:27 +10:00
util Use phutil_hashes_are_identical() when comparing hashes in Phabricator 2015-09-01 15:52:44 -07:00
PhabricatorEditor.php Mark some strings for translation 2015-06-09 23:06:52 +10:00