Unwanted Custom Field Changes in Issue History

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
dmarechal
Posts: 7
Joined: 23 Nov 2016, 15:30
Location: France

Unwanted Custom Field Changes in Issue History

Post by dmarechal »

Version : 1.3.3

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;
}
It worked just fine until I started to edit Issues. Everytime I edit an issue, whether I change the values of the custom field or not, I get a change notification in the Issue history for this particular custom field.

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!
Post Reply