How can you automatically send email from ALM 11 when a comment is added to a Requirment folder?
Question ID: 106323
0
0
Marked as spam
Posted by (Questions: 1, Answers: 0)
Asked on August 11, 2015 7:16 am
20 views
Answers (2)
0
Private answer

Dim GCHANGE
Function Req_FieldCanChange (FieldName, NewValue)
If FieldName=''RQ_DEV_COMMENTS'' Then
GCHANGE=1
End If
Req_FieldCanChange = True
End Function

Sub Req_AfterPost
On Error Resume Next
If GCHANGE=1 THen
Custom_Notification
End If
On Error GoTo 0
End Sub

Sub Custom_Notification
On Error Resume Next
Dim tdc
Dim objReqFactory
Dim reqlist
GCHANGE=0
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) AND (Req_Fields.Field(''RQ_TYPE_ID'').Value=''Folder'') Then
Set theReq = reqList.Item(1)
strTo = Req_Author
StrSubject = ''Requirement Folder 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 August 13, 2015 8:12 pm
0
Private answer

I would have to work up some code to do this specifically for the requirement folder. I think this other article is the starting point.

[http://eyeontesting.com/questions/988/how-do-i-send-custom-requirement-change-email-noti.html][1]

[1]: http://eyeontesting.com/questions/988/how-do-i-send-custom-requirement-change-email-noti.html

Marked as spam
Posted by (Questions: 6, Answers: 167)
Answered on August 11, 2015 4:12 pm
EyeOnTesting

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

X
Scroll to Top