Hello. The following workflow script will send an email whenever a defect has been added or updated. The email will only contain the information that is listed below. You will need to place the workflow into the Bug_AfterPost Sub. If you wish to display less info in the email body, you can just remove the lines you wish to leave out of the email.
The subject line will display the following:
''Defect ID # has been added or updated.''
The body of the email will display the following defect details:
- Defect ID
- Status
- Assigned To User ID
- Severity
- Detected By User ID
- Detected on Date
- Modified
As I previously stated, add the script below to the AfterPost Sub in the Defects module script editor:
Dim tdc
Dim header
Dim body
Set tdc = TDConnection
header = ''Mail Header''
body = ''Mail Body''
tdc.SendMail ''alm_user_email_address'','' '', _
''Defect ID # '' & Bug_Fields(''BG_BUG_ID'').Value & '' has been added or updated.'', _
'''' & ''Defect Details: '' & '''' & _
''
'' & '''' & ''Defect ID - '' & '''' & Bug_Fields(''BG_BUG_ID'').Value & _
''
'' & '''' & ''Status - '' & '''' & Bug_Fields(''BG_STATUS'').Value & _
''
'' & '''' & ''Assigned To User ID - '' & '''' & Bug_Fields(''BG_RESPONSIBLE'').Value & _
''
'' & '''' & ''Severity - '' & '''' & Bug_Fields(''BG_SEVERITY'').Value & _
''
'' & '''' & ''Detected By User ID - '' & '''' & Bug_Fields(''BG_DETECTED_BY'').Value & _
''
'' & '''' & ''Detected on Date - '' & '''' & Bug_Fields(''BG_DETECTION_DATE'').Value & _
''
'' & '''' & ''Modified - '' & '''' & Bug_Fields(''BG_VTS'').Value & _
NULL,''HTML''
tdc = Nothing