I have several custom fields:
- 3 of type Enumeration; and
- 1 of type Multiselection list.
My question concerns the multiselection list custom field. It has =users as Possible Values, and I use the following overriding function.
Code: Select all
function custom_function_override_enum_users() {
$t_users = project_get_all_user_rows( helper_get_current_project(), ANYBODY );
$t_enum = array();
foreach ($t_users as $t_user){
// I add the user's function after the user's name.
switch ($t_user['access_level']) {
case 10 : $t_enum[] = $t_user['username']." (GUEST)"; break;
case 11 : $t_enum[] = $t_user['username']." (EXT)"; break;
// ...
// ...
// ...
case 90 : $t_enum[] = $t_user['username']." (ADMIN)"; break;
}
}
$t_possible_values = implode('|',$t_enum);
return $t_possible_values;
}
I don't have this problem for custom fields of type enumeration.
I guess I am missing something in the overriding function, like a test. Do you have any clue of what variable/function I should use or where I should dig?
Thank you!