Page MenuHomePhabricator

Provide a generic "Datasource" StandardCustomField
ClosedPublic

Authored by epriestley on Sep 15 2015, 2:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 25, 1:19 AM
Unknown Object (File)
Wed, Apr 24, 4:51 AM
Unknown Object (File)
Wed, Apr 24, 4:51 AM
Unknown Object (File)
Wed, Apr 24, 4:51 AM
Unknown Object (File)
Wed, Apr 24, 4:51 AM
Unknown Object (File)
Thu, Apr 18, 5:15 PM
Unknown Object (File)
Tue, Apr 9, 2:41 AM
Unknown Object (File)
Wed, Apr 3, 8:10 AM
Subscribers
None

Details

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.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Provide a generic "Datasource" StandardCustomField.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added reviewers: chad, hach-que.
hach-que edited edge metadata.
This revision is now accepted and ready to land.Sep 15 2015, 2:51 PM
chad edited edge metadata.
This revision was automatically updated to reflect the committed changes.