How do I send custom Requirement change email notifications from Quality Center workflow?
Question ID: 104097
1
0

How do I send custom Requirement change email notifications from Quality Center workflow?

Marked as spam
Posted by (Questions: 36, Answers: 3)
Asked on April 19, 2010 7:23 pm
121 views
Answers (1)
1
Private answer

Disclaimer

While this example may meet the needs of your organization, the sole responsibility for modification and maintainance of the logic is yours.

The intent of the information provided here is for educational purposes only. As such, the topics in this document are only guidelines NOT a comprehensive solution, as your own environment will be different. The appropriate system technical resources for your enterprise should all perform customizaion activities. Best Practice dictates NO direct changes to any produciton environment. It is imparitive to perform and validate ALL modifications a Test Environment. Use the results and knowledge garnered from the Test
Environment experience to create a customized Produciton Deployment Plan for your own environment.

Business Rules

  1. Emails are sent each time a Requirement changes.
  2. Emails are sent to the Requirement Author entered in the Requirement Author field.
  3. When a Requirement Author does not have an email address, an email is sent to the Quality Center Administrator,in this example QC_Admin@XYZ.com. Customize the pQCAdmin variable for your own environment.
  4. The history of changes are included in the email for the Requirement fields with the history flag checked in the Project Entities Requirement Field Settings.

Example

Add this information to the existing Req_AfterPost subroutine.

Sub Req_AfterPost
  On Error Resume Next
     Custom_Notification
  On Error GoTo 0
End Sub

Add the new Custom_Notification subroutine to the workflow.

Sub Custom_Notification
    On Error Resume Next
    Dim tdc
    Dim objReqFactory
    Dim reqlist
         Set tdc = TDConnection
         Set objReqFactory = tdc.reqFactory
         Set ReqFilter = objReqFactory.Filter
         pQCAdmin = ''QC_Admin@XYZ.com'' 'Send the email to the Quality Center Administrator
                                        'Change for your own environment
         Req_Author = Req_Fields.Field(''RQ_REQ_AUTHOR'').Value
         pEmail = tdc.Customization.Users.User(Req_Author).Email
         If len(pEmail)<1 Then 'If Requirement Author's email address is blank
              pEmail = pQCAdmin 'Send the email to the Quality Center Administrator
              Req_Author = pEmail 'Change for your own environment
         End If
         ReqId = Req_Fields.Field(''RQ_REQ_ID'').Value
         ReqFilter.Filter(''RQ_REQ_ID'') = ReqId
         Set reqList = ReqFilter.NewList
         If reqList.Count > 0 Then
              Set theReq = reqList.Item(1)
              strTo = Req_Author
               StrSubject = ''Requirement Change NotIfication: '' & ReqId
              strComment = strSubject
              theReq.Mail strTo,,2,strSubject,strComment 'Send the email
         End If
         Set tdc = nothing
         Set objReqFactory = nothing
         Set ReqFilter = nothing
         Set reqList = nothing
    On Error GoTo 0
    End Sub
Marked as spam
Posted by (Questions: 6, Answers: 167)
Answered on April 19, 2010 7:41 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top