Email notification to the assigned user when a field is populated with a certain value
Question ID: 107884
1
0

I need to send an automatic email to the assigned user when the Status field is populated with the value 'Ready for Review'. I have added 'Assigned To User' field under Project Entities-> Requirements Module, field name is "RQ_USER_01", with a user lookup list. I have also modified the System field labeled 'Reviewed to Status' and added the list Items 'In Process', 'Ready for Review' and 'Approved'. Basically when the Requirement is Ready for Review, send an email to the Assigned user with details and attachment if there are any.

Marked as spam
Posted by (Questions: 239, Answers: 31)
Asked on October 4, 2017 8:25 pm
28 views
Answers (1)
1
Private answer

I will be glad to assist you with this. I have posted the script below that will send out an email notification when the user defined field is populated with the value 'Ready for Review'. You will need to edit the script to work with your current environment. I also recommend that you test this in a test project before implementing into your production environment.

Add this workflow to the existing Req_AfterPost subroutine:

Dim strTo
Dim strSubject
Dim strComment

Set tdc = TDConnection
Set objReqFactory = tdc.reqFactory
Set ReqFilter = objReqFactory.Filter
pQCAdmin = ''qcadmin@youremail.com'' 'Send the email to the Quality Center Administrator
'Change for your own environment
Req_AssignedTo = Req_Fields.Field(''RQ_USER_01'').Value
pEmail = tdc.Customization.Users.User(Req_AssignedTo).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_AssignedTo = pEmail 'Change for your own environment End If If Req_Fields(''RQ_REQ_REVIEWED'').Value = ''Ready for Review'' Then strTO = Req_AssignedTo strSubject = ''The Status for Requirement # '' & Req_Fields(''RQ_REQ_ID'').value & '' Has Changed to '' & Req_Fields(''RQ_REQ_REVIEWED'').value strComment = ''The Status for Requirement # '' & Req_Fields(''RQ_REQ_ID'').value & '' Has Changed to '' & Req_Fields(''RQ_REQ_REVIEWED'').value TDConnection.sendmail strTo, strFrom, strSubject, strComment, NULL, ''HTML'' Set TDConnection = nothing MsgBox ''Mail Sent'' End if Set tdc = nothing Set objReqFactory = nothing

Marked as spam
Posted by (Questions: 2, Answers: 300)
Answered on October 4, 2017 8:26 pm
EyeOnTesting

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

X
Scroll to Top