I have found that the following workflow script, used along with the SendDefectMail method may be what you are looking for. Enter the following workflow into the Defects module script within the Script Editor. The script assumes that the 'Assigned User' (BG_USER_01) and 'Detected User' (BG_USER_03) fields have been created. These fields will display the full name in the defect automail associated with the userid that populates the 'Detected By' and 'Assigned To' fields. In the defect automail, you will still see the 'Assigned To' and 'Detected By' fields, as these are links used to email the user displayed in that field.
Note: This is some example script that may need to be modified to fit your specific needs. I suggest that you give this a try in your test environment before implementing in your production environment.
Sub Bug_New
On Error Resume Next
'Script for the Assigned User field
Bug_Fields.Field(''BG_USER_01'').IsVisible = true
Bug_Fields.Field(''BG_USER_01'').IsReadOnly = true
'Script for the Detected User field
Bug_Fields.Field(''BG_USER_03'').IsVisible = true
Bug_Fields.Field(''BG_USER_03'').IsReadOnly = true
Bug_Fields.Field(''BG_USER_03'').Value = User.FullName
On Error GoTo 0
End Sub
Function getuserFullName(strUserName)
getuserFullName = TDConnection.Customization.Users.User(strUserName).FullName
End Function
Sub Bug_MoveTo
On Error Resume Next
Bug_Fields.Field(''BG_USER_01'').IsVisible = true
Bug_Fields.Field(''BG_USER_01'').IsReadOnly = false
Bug_Fields.Field(''BG_USER_03'').IsVisible = true
Bug_Fields.Field(''BG_USER_03'').IsReadOnly = false
Bug_Fields.Field(''BG_USER_01'').Value = UserFullName(Fields(''BG_RESPONSIBLE'').Value)
Bug_Fields.Field(''BG_USER_03'').Value = UserFullName(Fields(''BG_DETECTED_BY'').Value)
If Bug_Fields(''BG_USER_01'').Value <> UserFullName(Fields(''BG_RESPONSIBLE'').Value) then
Bug_Fields(''BG_USER_01'').Value = UserFullName(Fields(''BG_RESPONSIBLE'').Value)
ElseIf Bug_Fields(''BG_USER_03'').Value <> UserFullName(Fields(''BG_DETECTED_BY'').Value) then
Bug_Fields(''BG_USER_03'').Value = UserFullName(Fields(''BG_DETECTED_BY'').Value)
End if
Bug_Fields.Field(''BG_USER_01'').IsReadOnly = true
Bug_Fields.Field(''BG_USER_03'').IsReadOnly = true
On Error GoTo 0
End Sub
Sub Bug_FieldChange(FieldName)
On Error Resume Next
If FieldName = Bug_Fields(''BG_RESPONSIBLE'').FieldName Then
Bug_Fields(''BG_USER_01'').Value = getuserFullName(Bug_Fields(''BG_RESPONSIBLE'').Value)
ElseIf FieldName = Bug_Fields(''BG_DETECTED_BY'').FieldName Then
Bug_Fields(''BG_USER_03'').Value = getuserFullName(Bug_Fields(''BG_DETECTED_BY'').Value)
End If
On Error GoTo 0
End Sub