How to add other users to the ticket?

General discussion about MantisBT Plugins

Moderators: Developer, Contributor

Post Reply
Posts: 14
Joined: 28 Apr 2021, 14:57

How to add other users to the ticket?

Post by c3ltis »

As the topic . I know that you can enter the user name in the appropriate field, the problem is that only a person with administrator privileges can see the list of users. And what if the application is made after a telephone consultation, but we want the customer reporting by phone to be also informed, since we do not see the name of his account.
Posts: 14
Joined: 29 Aug 2019, 19:56

Re: How to add other users to the ticket?

Post by bmason »

I believe there is a way to create a custom enumerated field to store this information, then use a custom function to retrieve a list of users to populate the list.
For example, I have the following custom function in my /config/custom_functions_inc.php file (which I had to create):

# Construct an enumeration for all usernames.
# To use this in a custom field type "=users" in the possible values field.
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 ) {
$t_enum[] = $t_user['username'];
sort( $t_enum );
$t_possible_values = "|";
$t_possible_values = $t_possible_values . implode( '|', $t_enum );
return $t_possible_values;

As the comment indicates, you invoke this function by putting "=users" in the possible values for the enumerated field. I'm guessing there is a way to show the real name of the user instead of their username, by substituting a different fieldname instead of 'username' in the code above.
Post Reply