Formatting name fields

For name fields, you must use the same format selected in the Display user options in the Helix ALM Client for the logged in user. Choose Tools > User Options and then select Display.

Valid formats are:

  • First Middle Last (e.g., John G Smith)
  • Last, First Middle (e.g., Smith, John G)
You can also specify users by record ID. Valid format is uid:<user ID> (e.g., uid:15).

If you do not use the correct format or use a name that does not exist in the project database, the name will likely be ignored in the request as if you did not set the name field. If the field is required, an error is returned.

If multiple users with the same full name are found, the user with the lowest record ID in the project database is used. If a name field is not modified when editing an item and the project includes multiple users with the same first and last name, the item field value is not updated when changes are saved.

Multi-assignment workflow events

The CEvent type has assigntolist field, which is a string array. The following example shows how to format name fields for assigntolist.

CDefect def = ttsdk.editDefect(cookie, 0, "Defect summary", false);

 

string[] userList = { "user, first", "user, second", "user, third" };

 

// Create the event to add to the defect

CEvent evt = new CEvent();

 

evt.user = "Administrator, System";

evt.name = "Assign";

evt.date = DateTime.Now;

evt.assigntolist = userList;

 

if (def.eventlist == null || def.eventlist.Length < 1)

{

def.eventlist = new CEvent[1];

def.eventlist[0] = evt;

}

else

{

// Create a new event list that is larger than the previous event list

CEvent[] evtList = new CEvent[def.eventlist.Length + 1];

 

// Copy the old event list into the new list

for (int i = 0; i < def.eventlist.Length; i++)

{

evtList[i] = def.eventlist[i];

}

evtList[evtList.Length - 1] = evt;

 

def.eventlist = evtList;

}

 

ttsdk.saveDefect(cookie, def);