Implement "user" and "users" Maniphest custom fields

Summary:
Ref T2575. Implements "user" (zero or one users) and "users" (zero or more users) field types.

Also allows custom fields to participate in the handle pipeline.

Test Plan: {F35071}

Reviewers: hach-que, btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2575

Differential Revision: https://secure.phabricator.com/D5287
This commit is contained in:
epriestley
2013-03-07 17:24:58 -08:00
parent 30d6cd91da
commit 06b3f21b61
5 changed files with 152 additions and 30 deletions

View File

@@ -44,8 +44,8 @@ Each array key must be unique, and is used to organize the internal storage of
the field. These options are available:
- **label**: Display label for the field on the edit and detail interfaces.
- **type**: Field type, one of **int**, **string**, **bool**, **select**,
**remarkup**, or **date**.
- **type**: Field type: one of **int**, **string**, **bool**, **select**,
**remarkup**, **user**, **users**, or **date**.
- **caption**: A caption to display underneath the field (optional).
- **required**: True if the user should be required to provide a value.
- **options**: If type is set to **select**, provide options for the dropdown
@@ -54,8 +54,10 @@ the field. These options are available:
show next to the checkbox.
- **checkbox-value**: If type is set to **bool**, the value to show on
the detail view when the checkbox is selected.
- **default**: Default field value. For **date**, you can use a string like
`"July 4, 1990"`, `"5PM today"`, or any other valid input to `strtotime()`.
- **default**: Default field value.
- For **date**, you can use a string like `"July 4, 1990"`, `"5PM today"`,
or any other valid input to `strtotime()`.
- For **user** and **users**, you can use an array of user PHIDs.
- **copy**: When a user creates a task, the UI gives them an option to
"Create Another Similar Task". Some fields from the original task are copied
into the new task, while others are not; by default, fields are not copied.