I need to send an automail when design steps are added or edited in the Test Plan module?

  • Questions
  • I need to send an automail when design steps are added or edited in the Test Plan module?
Question ID: 107249
0
0

I am wanting to have emails sent to me whenever a user adds or edits design steps in the Test Plan module. Can you help me with this?

Marked as spam
Posted by (Questions: 217, Answers: 21)
Asked on November 3, 2016 7:42 pm
7 views
Answers (1)
0
Private answer

I have created the following script that will send an email when a step is added, or any existing design steps are edited. The script will list the user who made the changes, the step that was added / edited, and the info displayed in the description and expected results field if populated.

As you can see below, the script was added to the 'Sub DesignStep_FieldChange(FieldName)' function. This is where you will need to add in the Script Editor. Be sure to enter the email address for the user who is going to be receiving the emails. It is located in the 'tdc.SendMail' line of script for each of the if statements.

Location of the Script Editor - Go to 'Customize' --> Workflow --> Script Editor --> Expand 'Test Plan module script' and locate the 'DesignStep_FieldChange' function.

Sub DesignStep_FieldChange(FieldName)
'On Error Resume Next
Dim strSubject, strDes
Set tdc = TDConnection

If (DesignStep_Fields.Field(''DS_DESCRIPTION'').IsModified) And (DesignStep_Fields.Field(''DS_EXPECTED'').IsModified = False) Then
strSubject = ''Test Change Notification'' & '' for the '' & tdc.ProjectName & '' project in the '' & tdc.DomainName & '' domain. ''
strDes = ''User '' & User.FullName & '' has ADDED or EDITED the Description field in Design '' & DesignStep_Fields.Field(''DS_STEP_NAME'').Value &_
'' within the '' & Test_Fields.Field(''TS_NAME'').Value & '' test.'' & '' The field info is listed below: '' & '' '' Description Field: '' & DesignStep_Fields.Field(''DS_DESCRIPTION'').Value & '' Expected Result Field: '' & DesignStep_Fields.Field(''DS_EXPECTED'').Value
tdc.SendMail ''qcadmin@alm1250mail.com'', '''', strSubject, strDes, NULL,''HTML''

ElseIf DesignStep_Fields.Field(''DS_EXPECTED'').IsModified Then
strSubject = ''Test Change Notification'' & '' for the '' & tdc.ProjectName & '' project in the '' & tdc.DomainName & '' domain. ''
strDes = ''User '' & User.FullName & '' has ADDED or EDITED the Expected Results field in Design '' & DesignStep_Fields.Field(''DS_STEP_NAME'').Value &_
'' within the '' & Test_Fields.Field(''TS_NAME'').Value & '' test.'' & '' The field info is listed below: '' & '' Description Field: '' & DesignStep_Fields.Field(''DS_DESCRIPTION'').Value & '' Expected Result Field: '' & DesignStep_Fields.Field(''DS_EXPECTED'').Value
tdc.SendMail ''qcadmin@alm1250mail.com'', '''', strSubject, strDes, NULL,''HTML''
End If
'On Error GoTo 0
End Sub

Marked as spam
Posted by (Questions: 2, Answers: 278)
Answered on November 3, 2016 7:53 pm