Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
AKR Absent Member.
Absent Member.
564 views

Send email on filing a new defect based on a particular list item value

How can I set QC to send an email everytime a New defect is filed with a particular value or values based on a list field to one or more users. For example: I have a list field say "Field o1" with values "Value 01", "Value 02" and Value 03" etc., If I select either values 1 or 2 I should send an email to say Person 01 else if the value is value 03 then i should send it to person 02 and so on and so forth. Appreciate your Immediate help in this regard.
0 Likes
9 Replies
SreeKrishnan Absent Member.
Absent Member.

Re: Send email on filing a new defect based on a particular list item value

There are couple of ways to do this.

You can do this thru Automail configuration on Project Customize.Select the fields tab and move the Field 01 to the Mail on change of.

Then go to the conditions tab and select the user and click on conditions. Select the field (Field01)and filter on the values (say Value1 or Value 2). Then select the Status field and set the filter condition to "New"


The other way to do this id thru workflow, if you foresee a lot of email customization in the future.

0 Likes
AKR Absent Member.
Absent Member.

Re: Send email on filing a new defect based on a particular list item value

Hi SreeKrishnan,
thanks for the message. I might probably do it for a number of fields similar to this and number of email addresses. Can we do something in the Workflow area to script it seperately.
0 Likes
SreeKrishnan Absent Member.
Absent Member.

Re: Send email on filing a new defect based on a particular list item value

Sure. You can do it thru workflow. But the Automail configuration can help out with most of your conditions/filter. I would suggest that you try to use the Automail option and see how it works.

I will post a sample workflow script on how to configure the email by the end of the day.
0 Likes
AKR Absent Member.
Absent Member.

Re: Send email on filing a new defect based on a particular list item value

Thanks Sree. I will try it and let you know. Appreciate your help as always and as always you are the first to respond. Thanks.
0 Likes
Rajesh Haldar Absent Member.
Absent Member.

Re: Send email on filing a new defect based on a particular list item value

Sree.. did you post the custom workflow to customize the automail configuration?
0 Likes
Highlighted
AKR Absent Member.
Absent Member.

Re: Send email on filing a new defect based on a particular list item value

Hi Sree,
Can you post the Customized workflow script. I need to send email on certain status values and other values of list items for some more fields. So I guess, if i can get a sample script, that would be great.
0 Likes
SreeKrishnan Absent Member.
Absent Member.

Re: Send email on filing a new defect based on a particular list item value

This was a post that made on a diffrent thread earlier.

Below is a sample script that can help you out. This script will send an email to the Assigned To whenever a defect is assigned to them. This will just send a text.

Step 1:
Define a function SendDefectEmail (Defect WorkFlow). You need to enter your email address on Email From. The Subject and the EmailBidy can be modified to your needs.

Function SendDefectEmail
On Error Resume Next
Set tdc = TDConnection
EmailFrom = "xxxxx@xxxx.com"
EmailTo = Bug_Fields.Field("BG_RESPONSIBLE").Value
Subject = "Quality Center Email"
EmailBody = "This is a test email from Quality Center"

tdc.SendMail EmailTo, EmailFrom, Subject, EmailBody, NULL , "HTML"
Set tdc = Nothing
On Error Goto 0

End Function


Step 2:
Define the following on the Common Script outside of any sub or function (global variable)

Dim SendMail,EmailFrom,EmailTo,
Subject,EmailBody

Step 3: Enter the following under
Sub Bug_MoveTo and Sub Bug_New

SendMail = False


Step 4: Enter the following under
Sub Bug_FieldChange(FieldName)

If FieldName = "BG_RESPONSIBLE" Then
SendMail = True
End If


Step 5: Enter the following under Sub Bug_AfterPost

If SendMail = True then
SendDefectEmail
SendMail = False
End If


As said this is a simple email script thru workflow. You can set this on any field on the defect screen. You just need to put those condition on Bug_FieldChange.

The Subject of the email can be customised to have the defect Id and the Status.
0 Likes
SreeKrishnan Absent Member.
Absent Member.

Re: Send email on filing a new defect based on a particular list item value

Also take a look at this thread on how to format email in HTML format that I posted few days ago

http://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=1233237
0 Likes
Joe Schmidt_1 Absent Member.
Absent Member.

Re: Send email on filing a new defect based on a particular list item value

Would this work the same way in the workflow for the Business Components module?

Here's the way I edited the Send...Email function. As noted I'm not certain about the "Component_Fields.Field" syntax here. I've been trying to find a reference document that would help me make sure. (Side Note: It sure would be nice if workflow had some good debugging tools like QTP.)

Is there something I'm missing here?

Function SendComponentEmail
On Error Resume Next
' Set variables
Set tdc = TDConnection
EmailFrom = "noreply_QC_workflow@jha.com"
' NOTE: Not sure if Component_Fields is correct here.
EmailTo = Component_Fields.Field("CO_RESPONSIBLE").Value
Subject = "Quality Center Email"
EmailBody = "This is a test email from Quality Center"
' Send the email
tdc.SendMail EmailTo, EmailFrom, Subject, EmailBody, NULL , "HTML"
Set tdc = Nothing
On Error Goto 0
End Function
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.