Share this page

# Sending Mail when a Test Plan Module Field Value Changes

The example below demonstrates mail notification when the value of the status field is changed in the Test Plan module.

The code is added to the `Test_FieldChange` event procedure. It constructs a subject and comment for the email, and calls a user-defined function, `SendTest`. SendTest sends mail from the Test Plan module. You can code `SendTest` similarly to the `SendDefect` subroutine shown in Sending Mail when a Defect is Submitted.

    Sub Test_FieldChange(FieldName)
            On Error Resume Next
            Dim strSubject, strComment
            If FieldName = "TS_STATUS" Then
                strSubject = "Test Change Notification" & _
                    " for project " & TDConnection.ProjectName & _
                    " in domain " & TDConnection.DomainName
                strComment = "The user " & User.FullName & _
                    " changed the status of the test " & _
                    Test_Fields("TS_NAME").Value & _
                    " to " & Test_Fields("TS_STATUS").Value
                SendTest Test_Fields("TS_TEST_ID").Value, _
                    Test_Fields("TS_RESPONSIBLE").Value, "[QA Testers]", _
                    strSubject, StrComment
            End If
    End Sub

https://admhelp.microfocus.com ALM 8942
Tips to improve your search results... ALM Help Center ALM Help Center ALM Help 16.00-16.0.1 All View Local Help Center View Online Help Center back Go back in browser history forward Go forward in browser history Remove search highlights next topic Go to next topic previous topic Go to previous topic Print the current topic Version: