Automail from ALM with attachments included

  • Questions
  • Automail from ALM with attachments included
Question ID: 107890
0
0

We have a user who made customizations in the Management module (Releases > Cycles) with the assumption that we will be able to send emails with attachments to the ALM users. When the test coordinator attaches a file in the attachments tab of the cycle, identifies the reviewers in the Details – Reviewer fields, and sets the TEST_ Specification Status to "In Progress", an automail will be sent with the attachments included, to the users that will be "reviewing" the doc for that specific cycle.

Marked as spam
Posted by (Questions: 217, Answers: 21)
Asked on October 13, 2017 7:53 pm
10 views
Answers (1)
0
Private answer

I have posted the script below that will send out an email notification with attachments when the user defined field is populated with the value 'In Progress'. The body of the email will contain the Cycle ID number, as well as the project name where the cycle is located. 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 Cycle_FieldChange(FieldName) subroutine:

Sub Cycle_FieldChange(FieldName)
'On Error Resume Next
Dim strSubject, strDes, strComment
Dim objTDC, objAttachFact, objAttachment, objAttachment2, objAttachList
Dim objCycleFact, strCycleId, objCycle, objAttachmentList
Set tdc = TDConnection

Set objTDC = TDConnection

Set objCycleFact = objTDC.CycleFactory

strCycleId = Cycle_Fields(''RCYC_ID'').Value

Set objCycle = objCycleFact.Item(strCycleId)

Set objAttachFact = objCycle.Attachments

Set objAttachList = objAttachFact.NewList('''')

For Each objAttachment In objAttachList
If Instr(objAttachment.ServerFileName, strFilterType) then
j = j + 1
End If
Next

If j < 1 Then Else ReDim objAttachmentList(j - 1) End If For Each objAttachment2 In objAttachList If instr(objAttachment2.ServerFileName,strFilterType) Then objAttachmentList(i) = objAttachment2.ServerFileName i = i + 1 End If Next 'Replace 'RCYC_USER_01' with the title of the user defined field If Cycle_Fields.Field(''RCYC_USER_01'').Value = ''In Progress'' Then 'This line used if specific value needs to be used strSubject = ''Status Change Notification for Cycle #'' & Cycle_Fields.Field(''RCYC_ID'').Value & '' in project '' & tdc.ProjectName strDes = ''The status for Cycle # ['' & Cycle_Fields.Field(''RCYC_ID'').Value & ''] has changed to [ '' & Cycle_Fields.Field(''RCYC_USER_01'').Value & '' ].'' &_ '' Any documents attached to Cycle # ['' & Cycle_Fields.Field(''RCYC_ID'').Value & ''] have been attached to this email. '' 'the next line sends an email to a single user - multiple users need to be inserted in the quotes separated by semi-colons tdc.SendMail ''your_email@alm_mail.com'', '''', strSubject, strDes, objAttachmentList Set TDConnection = nothing End If 'On Error GoTo 0 End Sub

Marked as spam
Posted by (Questions: 2, Answers: 278)
Answered on October 13, 2017 7:55 pm