Re: ALM Quality Center: Releases Module - Create an Email Option for Cycle Info (1260 Views)
Reply
Advisor
KappSig00
Posts: 30
Registered: ‎03-26-2008
Message 1 of 10 (1,369 Views)

ALM Quality Center: Releases Module - Create an Email Option for Cycle Info

Version: ALM Quality Center 11.5.2

 

Issue: Our company will be utilizing the Releases Module for project and code tracking. At the release cycle level we have user fields created (Dev Lead, QA Lead, System Analyst, PM, Status, etc.) and would like a system generated email to be sent at will. I did add a toolbar icon so the user can click the button and have it send the email but I am not experienced enough in writing the workflow.

 

Has anyone else tried creating email functionality for the Releases Module? Is it possible?

 

 

Trusted Contributor
RajuThomas
Posts: 216
Registered: ‎07-04-2011
Message 2 of 10 (1,349 Views)

Re: ALM Quality Center: Releases Module - Create an Email Option for Cycle Info

I haven't try this, but this may work:
1. Identify the action for the button you created.
2. On that action, capture all necessary information into a variable or in the format you want the email contents to be
3. use TDConnection.SendMail method to send email.
Syntax (SendMail recipientAddress, EmailServer, subject, body of email,,TEXT/HTML
Advisor
KappSig00
Posts: 30
Registered: ‎03-26-2008
Message 3 of 10 (1,334 Views)

Re: ALM Quality Center: Releases Module - Create an Email Option for Cycle Info

I'm not ready to test yet but we'll see if this will work or not. We decided to move away from the button and just trigger the email when the status changes. Here is the direction we are heading in hopes that it will work. I'll post back with results.

 

Sub Cycle_FieldChange(FieldName)
'Name: WhenFieldChange
'Description: Handles what to do when a field change
'Called In: Test_FieldChange

On Error Resume Next
Dim strSubject, strComments
Dim colEmailTo, colCCTo

'If Approval Status field Changes

If FieldName = "RCYC_USER_07" Then
Select Case Cycle_Fields.Field("TS_USER_01").Value
Case "New"
If Cycle_CanPost Then
TDConnection.CycleFactory.Item(Cycle_Fields.Field("RCYC_ID").Value).Post
Cycle_Fields.Field("RCYC_USER_07").Value = "New"

 

 

colCCTo = User.UserName
strComments = "New Release: " & Cycle_Fields.Field("RCYC_NAME").Value & _
" was created for your review."

Call EmailATest(colEmailTo, colCCTo, strSubject, strComments)
End If


End Select
End If
On Error GoTo 0
End Sub

 

* I'm still working on the Sub EmailATest to see if this will work or not. This was used in another area of our old QC instance so I'm still trying to get it updated.

 

Sub EmailATest(strTo, strCc, strSubject, strComment)
'Name: EmailATest
'Description: Emails a test with History and Design Steps
'Called In: WhenFieldChange

On Error Resume Next
Dim objTestFactory, objTest

Set objTestFactory = TDConnection.TestFactory
Set objTest = objTestFactory.Item(Cycle_Fields("TS_TEST_ID").Value)

objTest.Mail strTo, strCc, 10, strSubject, strComment

Set objTest = Nothing
Set objTestFactory = Nothing
On Error GoTo 0
End Sub

Trusted Contributor
RajuThomas
Posts: 216
Registered: ‎07-04-2011
Message 4 of 10 (1,331 Views)

Re: ALM Quality Center: Releases Module - Create an Email Option for Cycle Info

I you need just a TDConnection object to invoke SendMail method. Also need to check if you can include CC. I think all email address/username should be separated by semicolon and QC will tag them into To.
Advisor
KappSig00
Posts: 30
Registered: ‎03-26-2008
Message 5 of 10 (1,308 Views)

Re: ALM Quality Center: Releases Module - Create an Email Option for Cycle Info

This is what I put together.. when you change the tdconnection to use ReqFactory or BugFactory it works in those modules but unfortunately does not work in the Releases module.. any ideas?

 

Sub SendCyc (iObjectId, strTo, strCc, strSubject, strComment)
On Error Resume Next
Dim objCycleFactory, objCycle
Set objCycleFactory = TDConnection.CycleFactory
Set objCycle = objCycleFactory.Item(iObjectId)
objCycle.Mail strTo, strCc, 4, strSubject, strComment
Set objCycle = Nothing
Set objCycleFactory = Nothing
MsgBox "Send Cycle"
End Sub

 

I do receive the message box when I attempt to test but do not get the email.

Trusted Contributor
RajuThomas
Posts: 216
Registered: ‎07-04-2011
Message 6 of 10 (1,297 Views)

Re: ALM Quality Center: Releases Module - Create an Email Option for Cycle Info

use objCycle.SendMail
Advisor
KappSig00
Posts: 30
Registered: ‎03-26-2008
Message 7 of 10 (1,295 Views)

Re: ALM Quality Center: Releases Module - Create an Email Option for Cycle Info

 I made the change but still not getting the emails. I've got this code within the Management script. Thought I would let yall know in case for some reason it should be elsewhere, although I doubt it.

 

I attached all of the code. Keep in mind that the fields within the email have not be set yet but the values do exist. I was just hoping to get it working first.

 

I appreciate any of the feedback you can offer. 

Trusted Contributor
RajuThomas
Posts: 216
Registered: ‎07-04-2011
Message 8 of 10 (1,280 Views)

Re: ALM Quality Center: Releases Module - Create an Email Option for Cycle Info

Number of parameters in call statmenet is different from function
SendCyc Cycle_Fields("RCYC_USER_07").Value, strTo, strSubject

in function you have 2 more parameters StrCC and StrComment

Also use this format for SendMail
SendMail recipientAddress, EmailServer, subject, body of email,,TEXT/HTML

I don't think you can add To and CC... only To will work. So if you have multiple recipients, add all those email address separated by ; into a variable and pass to match recipientAddress param

Provide your server address as next param. you can find it in Site Configuration settings.
Advisor
KappSig00
Posts: 30
Registered: ‎03-26-2008
Message 9 of 10 (1,270 Views)

Re: ALM Quality Center: Releases Module - Create an Email Option for Cycle Info

I tried the changes you mentioned but was still unsuccessful. I did put in a service request and received a response that they do not support email from this module. I'm currently still trying to figure out my options. If you happen to make it work please let me know. I've put my ticket in as critical so hopefully I will have some more info soon.

 

Thank you for you help so far.

Trusted Contributor
RajuThomas
Posts: 216
Registered: ‎07-04-2011
Message 10 of 10 (1,260 Views)

Re: ALM Quality Center: Releases Module - Create an Email Option for Cycle Info

Oh I just noticed that you are trying to invoke SendMail from Cycle Factory. SendMail method is in TDConnection object and here is the format
TDConnection.SendMail StrTo, ,StrSubject, StrComment,,TEXT

comment the On Error statement so you will in case of any error
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.