Page MenuHomePhabricator

Be able to set default user(s) for a custom "users" field
Closed, DuplicatePublic

Description

It does not seem possible to set or more default users in a custom field of type "users" for usage within Maniphest.
For example, whenever attempting to define a set of user names.


It is only visually possible to attempt setting one or multiple default user(s) by setting an array with the "PHID-USER-*" user values. See the example in the configuration below.

  • FYI, this "PHID-USER-*" value is extracted from the the value of the hidden field of the desired user, as rendered in a editable "users" field.
"cust:reviewer": {
  "name": "Reviewer",
  "type": "users",
  "search": true,
  "required": true
  "default": [
    "PHID-USER-wx672b7gtrpq6nflwbis"
  ]
 }

With visually possible, I mean that the configured user will neatly show up in the field as such:

vintrax.png (39×173 px, 1 KB)

However, the user will not actually be set upon saving the task. Additionally, no error is given when saving the task.

In the configuration example, this custom field is a required field. Maniphest will behave as if this configuration workaround is accepted when saving the task. Upon viewing the task, no user is set in the custom field and editing the task will then result into an accurate required field warning.

Event Timeline

vintrax updated the task description. (Show Details)
vintrax added projects: Custom Fields, Maniphest.
vintrax added a subscriber: vintrax.
chad renamed this task from Be able to set default user(s) for a custom "users" field within Maniphest to Be able to set default user(s) for a custom "users" field.Oct 29 2015, 3:16 PM
chad removed a project: Maniphest.

I could not find in the documentation how are we supposed to set a value for a custom field of type "user".
In particular, I am looking at doing this: set the default value to the current user (the user creating the Maniphest task)

Is this possible ? (from the documentation I could not tell)

Thanks much