1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-13 15:28:35 +01:00
phorge-phorge/src/infrastructure/customfield/standard
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
..
PhabricatorStandardCustomField.php Use PhutilClassMapQuery instead of PhutilSymbolLoader 2015-08-14 07:49:01 +10:00
PhabricatorStandardCustomFieldBool.php Stop threading handles through the CustomField + ApplicationSearch pipeline 2015-06-07 07:32:46 -07:00
PhabricatorStandardCustomFieldCredential.php Rename PassphraseCredentialType subclasses for consistency 2015-06-14 14:11:55 +10:00
PhabricatorStandardCustomFieldDatasource.php Provide a generic "Datasource" StandardCustomField 2015-09-21 04:41:52 -07:00
PhabricatorStandardCustomFieldDate.php Stop threading handles through the CustomField + ApplicationSearch pipeline 2015-06-07 07:32:46 -07:00
PhabricatorStandardCustomFieldHeader.php Implement detail views for many Differential fields on ApplicationTransactions 2014-02-26 14:46:18 -08:00
PhabricatorStandardCustomFieldInt.php Stop threading handles through the CustomField + ApplicationSearch pipeline 2015-06-07 07:32:46 -07:00
PhabricatorStandardCustomFieldLink.php Stop threading handles through the CustomField + ApplicationSearch pipeline 2015-06-07 07:32:46 -07:00
PhabricatorStandardCustomFieldPHIDs.php Fix a phutil_json_decode call in CustomField PHID 2015-07-16 21:02:01 -07:00
PhabricatorStandardCustomFieldRemarkup.php Don't put the entire corpus into project edit feed stories 2015-06-30 06:05:30 -07:00
PhabricatorStandardCustomFieldSelect.php Support "Select" custom fields in Herald rules 2015-07-16 14:12:54 -07:00
PhabricatorStandardCustomFieldText.php Stop threading handles through the CustomField + ApplicationSearch pipeline 2015-06-07 07:32:46 -07:00
PhabricatorStandardCustomFieldTokenizer.php Provide a generic "Datasource" StandardCustomField 2015-09-21 04:41:52 -07:00
PhabricatorStandardCustomFieldUsers.php Provide a generic "Datasource" StandardCustomField 2015-09-21 04:41:52 -07:00